您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
動画のロードを待たずに初期化する
当前为
// ==UserScript== // @name DontSetupLazy // @namespace https://github.com/segabito/ // @description 動画のロードを待たずに初期化する // @include http://www.nicovideo.jp/watch/* // @version 0.1 // @grant none // ==/UserScript== (function() { var addStyle = function(styles, id) { var elm = document.createElement('style'); window.setTimeout(function() { elm.type = 'text/css'; if (id) { elm.id = id; } var text = styles.toString(); text = document.createTextNode(text); elm.appendChild(text); var head = document.getElementsByTagName('head'); head = head[0]; head.appendChild(elm); }, 0); return elm; }; if (window.PlayerApp && window.WatchJsApi) { addStyle('#nicoSpotAdAds >*:nth-child(2) { display: none !imortant; position: fixed; top: -999px; }'); window.setTimeout(function() { var watchInfoModel = WatchApp.ns.model.WatchInfoModel.getInstance(); if (!watchInfoModel.initialized) { console.log('%cinitialize Immediately', 'background: lightgreen;'); WatchApp.ns.EmbeddedWatchData.run_ = WatchApp.ns.EmbeddedWatchData.run; WatchApp.ns.EmbeddedWatchData.run = function() { $('#nicoSpotAdAds >*:nth-child(2)').remove(); }; window.setTimeout(function() { console.time('initialize Immediately'); WatchApp.ns.EmbeddedWatchData.run_(JSON.parse($('#configDataContainer').html())); console.timeEnd('initialize Immediately'); }, 0); } }, 0); } })();