Ahto Library

My library used my other scripts.

لا ينبغي أن لا يتم تثبيت هذا السكريت مباشرة. هو مكتبة لسكبتات لتشمل مع التوجيه الفوقية // @require https://update.greasyfork.org/scripts/10922/75750/Ahto%20Library.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// Generated by CoffeeScript 1.9.3
var exit, findMatches, injectScript, numberWithCommas, randInt, safeInterval, safeParseInt, setTimeout_, stringHashCode, urlMatches;

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));
};

numberWithCommas = function(n) {
  return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};

exit = function() {
  throw new Error('Not an error just exiting early');
};

setTimeout_ = function(wait, f) {
  return setTimeout(f, wait);
};

injectScript = function(f) {
  var script, source;
  if (typeof f === 'function') {
    source = "(" + f + ")();";
  }
  script = $("<script type='application/javascript'>\n    " + source + "\n</script>");
  $(document).append(script);
  return script.remove();
};

urlMatches = function(regexp) {
  return regexp.test(window.location.href);
};