Dakusan's Domain Forum

Main Site Discussion => Posts => Topic started by: Dakusan on July 21, 2015, 10:34:46 pm

Title: Netflix Auto Continue Play
Post by: Dakusan on July 21, 2015, 10:34:46 pm
Original post for Netflix Auto Continue Play can be found at https://www.castledragmire.com/Posts/Netflix_Auto_Continue_Play.
Originally posted on: 07/21/15

Here is a little Tampermonkey script for Chrome that automatically clicks the “Continue playing” button when it pops up on Netflix, pausing the current stream.


// ==UserScript==
// @name         Netflix auto continue play
// @namespace    https://www.castledragmire.com/Posts/Netflix_Auto_Continue_Play
// @version      1.0
// @description  When netflix pops up the "Continue play" button, this script auto-selects "Continue" within 1 second
// @author       Dakusan
// @match        http://www.netflix.com/
// @grant        none
// ==/UserScript==

setInterval(function() {
   var TheElements=document.getElementsByClassName('continue-playing');
   for(var i=0;i<TheElements.length;i++)
       if(/\bbutton\b/.test(TheElements[i].className))
       {
           console.log('"Continue Playing" Clicked');
           TheElements[i].click();
       }
}, 1000);

Make sure to set the “User matches” in the settings page to include both “http://www.netflix.com/*” and “https://www.netflix.com/*”.