Greasy Fork is available in English.

parseuri license

Required for cs script

ეს სკრიპტი არ უნდა იყოს პირდაპირ დაინსტალირებული. ეს ბიბლიოთეკაა, სხვა სკრიპტებისთვის უნდა ჩართეთ მეტა-დირექტივაში // @require https://update.greatest.deepsurf.us/scripts/2352/7712/parseuri%20license.js.

  1. // ==UserScript==
  2. // @name parseuri license
  3. // @description Required for cs script
  4. // ==/UserScript==
  5.  
  6. // parseUri 1.2.2
  7. // (c) Steven Levithan <stevenlevithan.com>
  8. // MIT License
  9.  
  10. function parseUri (str) {
  11. var o = parseUri.options,
  12. m = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
  13. uri = {},
  14. i = 14;
  15.  
  16. while (i--) uri[o.key[i]] = m[i] || "";
  17.  
  18. uri[o.q.name] = {};
  19. uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
  20. if ($1) uri[o.q.name][$1] = $2;
  21. });
  22.  
  23. return uri;
  24. };
  25.  
  26. parseUri.options = {
  27. strictMode: false,
  28. key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
  29. q: {
  30. name: "queryKey",
  31. parser: /(?:^|&)([^&=]*)=?([^&]*)/g
  32. },
  33. parser: {
  34. strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
  35. loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
  36. }
  37. };