Sport-Express: No autoplay, please!

Выключает автоматическое воспроизведение видео на страницах Спорт-Экспресс.

目前为 2015-06-01 提交的版本。查看 最新版本

// ==UserScript==
// @name        Sport-Express: No autoplay, please!
// @description Выключает автоматическое воспроизведение видео на страницах Спорт-Экспресс.
// @namespace   lainscripts_sportexpress_no_autoplay_please
// @include     http://www.sport-express.ru/*
// @include     https://www.sport-express.ru/*
// @include     http://video.sport-express.ru/*
// @include     https://video.sport-express.ru/*
// @version     3
// @grant       none
// ==/UserScript==
var obs = new MutationObserver(function(m){
    m.forEach(function(i) {
        if (i.addedNodes.length > 0)
            for(var j=0;j<i.addedNodes.length;j++)
                if (i.addedNodes[j].outerHTML.search('player') > -1)
                   i.addedNodes[j].innerHTML = i.addedNodes[j].innerHTML.replace(/&(amp;)?autoplay(=\d)?/,'');
    });
});

obs.observe(document.querySelector('.bottom'), {childList:true});

(function (objs) {
    for(var i=0;i<objs.length;i++)
        objs[i].value = objs[i].value.replace('&autoplay','');
}) (document.querySelectorAll('param[name="flashvars"]'));

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址