fixes
|
@ -443,7 +443,7 @@ Let's recap these methods to avoid any confusion:
|
|||
|
||||
| method | selects... | negatives |
|
||||
|--------|-----------|-----------|
|
||||
| `slice(start, end)` | from `start` to `end` | allows negatives |
|
||||
| `slice(start, end)` | from `start` to `end` (not including `end`) | allows negatives |
|
||||
| `substring(start, end)` | between `start` and `end` | negative values mean `0` |
|
||||
| `substr(start, length)` | from `start` get `length` characters | allows negative `start` |
|
||||
|
||||
|
|
|
@ -22,10 +22,11 @@ function getSecondsToTomorrow() {
|
|||
let hour = now.getHours();
|
||||
let minutes = now.getMinutes();
|
||||
let seconds = now.getSeconds();
|
||||
let totalSecondsToday = (hour * 60 + minutes) * 60 + seconds;
|
||||
let totalSecondsToday = (hour * 60 + minutes) * 60 + seconds;
|
||||
let totalSecondsInADay = 86400;
|
||||
|
||||
|
||||
return totalSecondsInADay - totalSecondsToday;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Please note that many countries have Daylight Savings Time (DST), so there may be days with 23 or 25 hours. We may want to treat such days separately.
|
||||
|
|
|
@ -63,7 +63,7 @@ There are only two top-level exclusions:
|
|||
|
||||
In other cases everything's straightforward -- if there are spaces (just like any character) in the document, then they become text nodes in DOM, and if we remove them, then there won't be any.
|
||||
|
||||
Here are no-space, text-only nodes:
|
||||
Here are no space-only text nodes:
|
||||
|
||||
```html no-beautify
|
||||
<!DOCTYPE HTML>
|
||||
|
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |