您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replaces the Flash player with a native HTML5 one
// ==UserScript== // @name Golem.de HTML5 Video // @namespace golem.de.html5.video.stuff.dasprids.de // @description Replaces the Flash player with a native HTML5 one // @include http://*.golem.de/* // @version 1 // @grant none // ==/UserScript== // For www.golem.de var figures = document.getElementsByTagName('figure'); for (var i = 0; i < figures.length; ++i) { if (!figures[i].hasAttribute('id')) { continue; } var id = figures[i].getAttribute('id'); if (!id.startsWith('gvideo')) { continue; } figures[i].removeAttribute('id'); var videoId = id.split('_')[1]; var videoUrl = 'http://video.golem.de/download/' + videoId; figures[i].innerHTML = '<video controls="controls" width="620"><source src="' + videoUrl + '" type="video/mp4" /></video>'; } // For video.golem.de var projectors = document.getElementsByClassName('projekktor'); for (var i = 0; i < projectors.length; ++i) { if (!projectors[i].hasAttribute('id')) { continue; } var match = projectors[i].getAttribute('id').match(/^NVBPlayer(\d+)$/); if (!match) { continue; } projectors[i].removeAttribute('id'); var videoId = match[1]; var videoUrl = 'http://video.golem.de/download/' + videoId; projectors[i].innerHTML = '<video controls="controls" width="620"><source src="' + videoUrl + '" type="video/mp4" /></video>'; }