Skip to content

Instantly share code, notes, and snippets.

@coryshaw1
Last active March 13, 2024 21:33
Show Gist options
  • Select an option

  • Save coryshaw1/7917c6998e80cf9f6954b19b67f819ef to your computer and use it in GitHub Desktop.

Select an option

Save coryshaw1/7917c6998e80cf9f6954b19b67f819ef to your computer and use it in GitHub Desktop.
Autorefresh Surfline surf cams without refreshing page
// ==UserScript==
// @name Surfline
// @namespace http://github.com/coryshaw1
// @description Autorefresh Surfline surf cams without refreshing page (fake premium)
// @author Cory Shaw
// @include https://*.surfline.com/*
// @version 0.0.1
// @grant none
// ==/UserScript==
setInterval(function() {
if (!document.querySelector('.quiver-cam-upsell__message__subtext'))
return;
document.querySelector('.quiver-cam-upsell').remove();
document.querySelector('.quiver-cam-player__upsell-countdown').remove();
jwplayer().play();
}, 100);
@rschenk

rschenk commented Oct 14, 2019

Copy link
Copy Markdown

Seems like Surfline has changed their html structure, and this is no longer working. Here's an updated version that seeeems to work... until they update their structure again.

Update for Aug 2021, this is working for me and others:

setInterval(function() {
    if (!document.querySelector('.quiver-cam-upsell__message'))
       return;

    document.querySelector('.quiver-cam-upsell__message').parentNode.parentNode.style.display = 'none';
    jwplayer().play();
}, 100);

@easybe

easybe commented Jun 8, 2021

Copy link
Copy Markdown

@rschenk's suggestion will actually result in a 500 error after the first run. Following works for me:

setInterval(function() {
    if (!document.querySelector('.quiver-cam-upsell__message'))
       return;

    document.querySelector('.quiver-cam-upsell__message').parentNode.parentNode.innerHTML = '';
    jwplayer().play();
}, 100);

@silversurfer6

Copy link
Copy Markdown

@rschenk's suggestion will actually result in a 500 error after the first run. Following works for me:

setInterval(function() {
    if (!document.querySelector('.quiver-cam-upsell__message'))
       return;

    document.querySelector('.quiver-cam-upsell__message').parentNode.parentNode.innerHTML = '';
    jwplayer().play();
}, 100);

Yes this works..thanks mate

@scottmullaly

scottmullaly commented Mar 5, 2024

Copy link
Copy Markdown

Anyone got an update? they are using videojs now not jwplayer @coryshaw1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment