您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Basic function that are needed by several scripts use with @require
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greatest.deepsurf.us/scripts/5647/21124/InstaSynchP%20Library.js
// ==UserScript== // @name InstaSynchP Library // @namespace InstaSynchP // @description Basic function that are needed by several scripts use with @require // @version 1.0.2 // @author Zod- // @source https://github.com/Zod-/InstaSynchP-Library // @license GPL-3.0 // @include http://*.instasynch.com/* // @include http://instasynch.com/* // @include http://*.instasync.com/* // @include http://instasync.com/* // @grant none // @run-at document-start // ==/UserScript== //parent class for all plugins function Plugin(version){ this.version = version; } if (!window.pluginLibrary) { if (typeof String.prototype.startsWith !== 'function') { // see below for better implementation! String.prototype.startsWith = function (str) { return this.indexOf(str) === 0; }; } window.isBlackname = function (username) { "use strict"; if (typeof username !== 'string') { return false; } return username.match(/^([A-Za-z0-9]|([\-_](?![\-_]))){5,16}$/) !== null; }; window.activeVideoIndex = function () { "use strict"; return $('#playlist .active').index(); }; window.findUserId = function (id) { "use strict"; var i; for (i = 0; i < window.users.length; i += 1) { if (id === window.users[i].id) { return window.users[i]; } } return undefined; }; window.findUserName = function (name) { "use strict"; var i; for (i = 0; i < window.users.length; i += 1) { if (name === window.users[i].name) { return window.users[i]; } } return undefined; }; window.videojs = function () { "use strict"; return $('.video-js')[0]; }; window.reloadPlayer = function () { "use strict"; if (window.video) { window.video.destroy(); } window.global.sendcmd('reload', null); }; window.addSystemMessage = function (message) { "use strict"; window.addMessage({ username: "" }, message, 'system'); }; window.addErrorMessage = function (message) { "use strict"; window.addMessage({ username: "" }, message, 'errortext'); }; window.videoInfoEquals = function (a, b) { "use strict"; if (!a || !b) { return false; } if (a.provider && a.provider === b.provider && a.mediaType && a.mediaType === b.mediaType && a.id && a.id === b.id) { return true; } return false; }; window.pluginLibrary = true; }