aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-01-27build(deps): bump cached-path-relative from 1.0.2 to 1.1.0dependabot/npm_and_yarn/cached-path-relative-1.1.0dependabot[bot]
Bumps [cached-path-relative](https://github.com/ashaffer/cached-path-relative) from 1.0.2 to 1.1.0. - [Release notes](https://github.com/ashaffer/cached-path-relative/releases) - [Commits](https://github.com/ashaffer/cached-path-relative/commits) --- updated-dependencies: - dependency-name: cached-path-relative dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
2020-05-24index.ts: Reinitialise when the page changesv0.0.1Teddy Wing
Netflix doesn't reload when you change pages, so our listeners don't get reinitialised. This means, when you watch one video, then click the "Back to Browse" button to go back to the /browse page, and select another video, Immersive won't work on the newly-loaded video. Ensure the plugin works in this case by reinitialising when the `popstate` changes.
2020-05-16userscript-header.txt: @match all Netflix URL pathsTeddy Wing
When the `/watch` page was opened from a Netflix `/browse` or `/title` page, the user script wouldn't be loaded. This is because the navigation happens via JavaScript, so Greasemonkey can't load the script. Ensure the script is always loaded by matching all Netflix URL paths.
2020-05-10fullscreen_credits: Remove `attributeOldValue` on mutation observerTeddy Wing
Don't need the old attribute value. I had added this originally to be able to print the values to the console for development. Now it's no longer needed.
2020-05-10Hide the cursor when credits playTeddy Wing
When the credits start playing, we click on the player, giving it the `active` class, and causing the mouse cursor to appear. The cursor should remain hidden.
2020-05-10styles: Hide the white border that appears around creditsTeddy Wing
A white border appears around the frame while the credits are in minimised mode. This is visible on the top and left sides of the frame. Since we automatically click on the video, the white border only appears for a second or less, but it's still visually jarring, all the more because it shifts the position of the video. Remove the white border, ensuring it never appears.
2020-05-09styles: Set !importantTeddy Wing
The age advisory ratings weren't properly hidden. Probably due to CSS specificity. Add `!important` to ensure that the elements we want to hide are always hidden.
2020-05-09Add documentation commentsTeddy Wing
2020-05-09styles: Make the styles() function the default exportTeddy Wing
2020-05-08Makefile: Always remove license headers from all JS filesTeddy Wing
It turns out that the way I formulated it before, it wouldn't always strip the license headers from all files.
2020-05-08Add READMETeddy Wing
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-08Add distribution scriptTeddy Wing
2020-05-08Makefile: Only build `index.js` with BrowserifyTeddy Wing
Previously this rule was passing all inputs to Browserify. We only need to pass `index.js`.
2020-05-08Makefile: Move the compiled user script to the project rootTeddy Wing
Makes it easier to find for distribution and removes a circular Make dependency (which gets ignored).
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-06Makefile: Fix rebuild of non-index.js filesTeddy Wing
Previously, if I modified any TypeScript file other than `index.ts`, Make wouldn't rebuild. Depend on all JS files in build/ to ensure the output script gets rebuilt on changes.
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.
2020-05-05Reactivate player controls and hide UITeddy Wing
Click the player frame to reactivate player controls. Player controls disappear once the credits get minimised. The problem with clicking the player frame, though, is that the controls UI becomes visible. We want the controls DOM elements to come back, but stay hidden. Change the CSS class to "inactive" to hide the UI. There is a problem with this currently: jiggling the mouse over the video after the class is changed doesn't make the controls visible. Need to move the cursor out of the frame and back in to reset the visibility state. Add a couple CSS styles to hide: * The "Back to Browse" button that appears for a second in the top left corner of the page * The "RATED …" label in the top left corner of the page
2020-05-05Use `classList.remove()`Teddy Wing
Turns out `classList` isn't an array, it's a `DOMTokenList`, and it doesn't have an `includes()` method. Instead, use `contains()`. `DOMTokenList` also doesn't have a `filter()`, but we can remove the `.postplay` class much easier with the `remove()` method. Turns out I didn't need to worry about a `childList` mutation observer as I previously thought. This version works. Now that the class is removed, the video no longer reduces to the small frame.
2020-05-05Try removing `postplay` class from player elementTeddy Wing
Use a `MutationObserver` to get an event when the Netflix player's class attribute changes. Want to try removing the `.postplay` class, which makes the player reduce to a small frame. This doesn't currently work because when the player is reduced, a second player element is added to the DOM, and my reference no longer corresponds to the right player. Looks like I'll need to try adding a mutation observer on child elements, and watch for a new player element being added.
2020-05-05Remove `webRequest` codeTeddy Wing
This doesn't work. It's not possible to modify the response body using this API, and even if I could, it turns out the flags I intended to modify aren't related to the small-window-credits.
2020-05-03manifest.json: Fix gecko.idTeddy Wing
I had obviously copied this manifest code from one of my other extensions, and forgot to change the ID. Use a unique ID.
2020-05-03Old background and content scriptsTeddy Wing
Back when I first tried writing this, I explored a couple ideas using the `skipCreditsEnabled` and `wwwplayer.config.skip.credits.enabled` properties initialised on Netflix pages. The first idea was to use a content script to change these values from `true` to `false`. However, I found that this didn't do anything, very likely because the global configs are read at load time, and my script didn't overwrite them early enough. I tried setting `"run_at": "document_start"` in the `content_scripts` manifest, but that didn't do anything either. The next idea was to use the `webRequest` API in a background script to rewrite these properties before the page was rendered in the browser. The problem with that idea was that you're not allowed to modify the response body using this API. You can only modify headers. That's where I stopped. Today, I picked up the project again, this time using Mitmproxy to modify the response body and flip these two properties. The properties were correctly set to false, but it turns out that didn't change the windowed-video-credits behaviour. Only then did I realise that these properties instead probably control whether the "Skip Credits" _button_ is displayed or not, and have nothing to do with the small-frame video. This is indicated by the `skipCreditsDisplayDuration` property, which is set to 6000, likely meaning that the button should display for 6 seconds. I don't know why it took me so long, but the real answer is so simple and obvious: use CSS instead. The video player is assigned different classes once the credits start rolling. All we need to do is: * Ensure these classes don't get applied, or their styles don't get applied * Ensure the "Back to Browse" button doesn't show * Ensure the video controls still display when hovering over the video (possibly by virtually clicking on the video)
2018-12-16Add a draft `manifest.json`Teddy Wing