Last active
August 29, 2015 14:18
-
-
Save losipiuk/c9a909952564183c40a2 to your computer and use it in GitHub Desktop.
tampermonkey: disable autoplay for gazeta.tv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Disable autoplay on gazeta.pl | |
// @namespace http://your.homepage/ | |
// @version 0.1 | |
// @description Disables autoplay for iframe movies coming from www.gazeta.tv | |
// @author Lukasz Osipiuk | |
// @match http://*gazeta.pl/* | |
// @match http://*.sport.pl/* | |
// @grant none | |
// ==/UserScript== | |
var frames = document.querySelectorAll('iframe[src*="gazeta.tv"][src*="autoplay="]'), i = frames.length; | |
for(i = 0; i < frames.length; ++i) { | |
newSrc = frames[i].src; | |
newSrc = newSrc.replace("autoplay=1", "autoplay=0"); | |
newSrc = newSrc.replace("autoplay=true", "autoplay=false"); | |
frames[i].src = newSrc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment