aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
2020-05-08Add license (GNU GPLv3+)Teddy Wing
2020-05-08Rename project to "Immersive"Teddy Wing
Sounds better than "No Skip", and also reflects the fact that we want to remove anything that hinders immersion while watching a video, not just skipped credits.
2020-05-08styles: Combine all our rules into oneTeddy Wing
Since we set `visibility: hidden` for all elements, combine them all into a single CSS rule.
2020-05-08styles: Hide skip buttonsTeddy Wing
2020-05-08controls.hide(): Hide controls immediatelyTeddy Wing
Don't use `wait_element` to hide the controls. I had done that because I thought that the element wasn't there after clicking the "Watch Credits" button, and I had to wait for it before trying to hide it. Turns out the reason why the credits weren't hiding was that I just shadowed the `controls` variable. This waiting isn't necessary, and in fact it's undesirable, because it causes the player controls to appear for a second before being hidden instead of not appearing at all.
2020-05-08watch_credits: Fix shadowed `controls` variableTeddy Wing
Silly me, the `controls` module was getting shadowed by the `controls` variable in `init_mutation_observer()`, which contained the DOM element. That's why the controls weren't getting hidden. Now that we're no longer shadowing the variable, the controls do get properly hidden.
2020-05-08Use `const` variable declarations where possibleTeddy Wing
2020-05-08Remove old development commentsTeddy Wing
Old notes while I was working out elements and selectors to use.
2020-05-08index: Call `styles()` firstTeddy Wing
We should insert the styles at the very start, because they hide things that are displayed when you start watching. The credits handling always happens at the end of the video. Also reorder imports alphabetically.
2020-05-08Automatically click the "Watch Credits" buttonTeddy Wing
TV series on Netflix now display a "Watch Credits" button when the credits start rolling. We can hide this button using CSS and the credits will continue playing to the end, but while it's displayed, the player controls are hidden. Automatically click the button to make it go away and reactivate the player controls. The tricky thing, though, is that the "Watch Credits" button doesn't have a click handler. Instead, it listens to the "pointerdown" event, so we have to construct one programmatically (and turn on `bubbles`, otherwise the button doesn't react to the event) and dispatch it. Moved `with_player` to `wait_element`, because now I need to wait for more DOM elements than just the player element. Add a new `controls` module since I need to hide the player controls in both `fullscreen_credits` and `watch_credits`. Add the `DOM` lib to `tsconfig.json` to give us DOM types.
2020-05-08styles: Hide the "Watch Credits" buttonTeddy Wing
This button appears now when the credits of TV series start playing.
2020-05-06Move `with_player` to a new moduleTeddy Wing
Move this function to a new module as I'd like to use it for checking the "Watch Credits" button. Also change from a callback to a `Promise`. Need to include the `Promise` lib via ES2015 in tsconfig to be able to build with promises.
2020-05-06styles: Fix `stylesheet` is `null` errorTeddy Wing
I had initialised the `stylesheet` variable before the element existed in the DOM.
2020-05-06Convert from a web extension to a user scriptTeddy Wing
Since it looks like everything's going to happen in the content script, might as well make this a user script instead. Build with Browserify in order to get a compiled JS file compatible with browsers. For some reason I'm currently getting an error complaining that the `stylesheet` variable is `null`. Need to look into that.
2020-05-05Move fullscreen credits init function to fullscreen_credits.tsTeddy Wing
Makes more sense to put it in the fullscreen_credits module.
2020-05-05src/index.ts: Remove commented global variableTeddy Wing
That was for testing and is no longer needed.
2020-05-05Extract credits handling and CSS styles to separate modulesTeddy Wing
Start to establish a bit of separation and organisation.
2020-05-05Move content script to TypeScriptTeddy Wing
I'd like to split up some functionality into modules, and it seems like using TypeScript would be a good way to achieve that.