您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
My library used my other scripts.
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/10922/61510/Ahto%20Library.js
- // Generated by CoffeeScript 1.9.3
- var findMatches, randInt, safeInterval, safeParseInt, stringHashCode;
- findMatches = function(selector, min, max) {
- var matches, ref;
- if (min == null) {
- min = 1;
- }
- if (max == null) {
- max = Infinity;
- }
- matches = $(selector);
- if ((min <= (ref = matches.length) && ref <= max)) {
- return matches;
- } else {
- throw Error(matches.length + " matches (expected " + min + "-" + max + ") found for selector: " + selector);
- }
- };
- safeParseInt = function(s) {
- var n;
- n = parseInt(s);
- if (isNaN(s)) {
- throw new Error("Unable to parse int from \"" + s + "\"");
- } else {
- return n;
- }
- };
- safeInterval = function(func, wait, times) {
- var interv;
- interv = (function(w, t) {
- return (function() {
- var e;
- if ((t == null) || t-- > 0) {
- setTimeout(interv, w);
- try {
- return func.call(null);
- } catch (_error) {
- e = _error;
- t = 0;
- throw e.toString();
- }
- }
- });
- })(wait, times);
- return setTimeout(interv, wait);
- };
- stringHashCode = function(s) {
- var chr, hash, i, j, len;
- hash = 0;
- for (j = 0, len = s.length; j < len; j++) {
- i = s[j];
- chr = i.charCodeAt(0);
- hash = ((hash << 5) - hash) + chr;
- hash |= 0;
- }
- return hash;
- };
- randInt = function(min, max) {
- return min + Math.floor(Math.random() * (max + 1 - min));
- };