您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Bibby specific changes
当前为
// ==UserScript== // @name InstaSynchP Bibby // @namespace InstaSynchP // @description Bibby specific changes // @version 1.0.5 // @author Zod- // @source https://github.com/Zod-/InstaSynchP-Bibby // @license MIT // @include *://instasync.com/r/* // @include *://*.instasync.com/r/* // @grant none // @run-at document-start // @require https://greasyfork.org/scripts/5647-instasynchp-library/code/InstaSynchP%20Library.js?version=37716 // ==/UserScript== function Bibby(version) { "use strict"; this.version = version; this.name = 'InstaSynchP Bibby'; this.settings = [{ 'label': 'Wallcounter limit notifications', 'id': 'wallcounter-hide', 'type': 'checkbox', 'default': false, 'section': ['Bibby'] }]; this.isBibby = false; } Bibby.prototype.wallcounterNotificationOnce = function () { "use strict"; var th = this, wallcounter = window.plugins.wallcounter; if (isUdef(wallcounter)) { return; } wallcounter.formatOutput = function (counts) { var output = "Wallcounter<br>"; counts.forEach(function (count, index) { var text = "{0}[<b>{2}</b> - {1}] - "; if (count.duration > 60 * 60) { text = '<span style="color:red">{0}[<b>{2}</b> - {1}]</span> - '; } output += text.format( count.origName, count.count, utils.secondsToTime(count.duration) ); //2 counters per line if ((index + 1) % 2 === 0) { //remove " - " output = output.substring(0, output.length - 3); output += '<br>'; } }); //remove " - " if (counts.length % 2 === 1) { output = output.substring(0, output.length - 3); } return output; }; }; Bibby.prototype.checkCounter = function (video) { var message, counter; //wallcounter not installed counter = wallcounter.counter[video.addedby.toLowerCase()]; if (isUdef(counter) || counter.duration < 60 * 60) { //nothing to report return; } message = 'Wallcounter {0}[{1} - {2}]'.format( counter.origName, window.utils.secondsToTime(counter.duration), counter.count); addErrorMessage(message); }; Bibby.prototype.wallcounterNotification = function () { "use strict"; var th = this, wallcounter = window.plugins.wallcounter; if (isUdef(wallcounter)) { return; } events.on(th, 'AddVideo', th.checkCounter); }; Bibby.prototype.executeOnce = function () { "use strict"; var th = this; th.isBibby = (window.room.roomName.toLowerCase() === 'bibby'); th.wallcounterNotificationOnce(); }; Bibby.prototype.postConnect = function () { "use strict"; var th = this; if (!th.isBibby) { return; } th.wallcounterNotification(); }; Bibby.prototype.resetVariables = function () { "use strict"; var th = this; events.unbind('AddVideo', th.checkCounter); }; window.plugins = window.plugins || {}; window.plugins.bibby = new Bibby('1.0.5');