diff --git a/.eslintignore [DEPRECATED] b/.eslintignore [DEPRECATED] new file mode 100644 index 0000000..db181dd --- /dev/null +++ b/.eslintignore [DEPRECATED] @@ -0,0 +1 @@ +**/*.min.js diff --git a/.eslintrc.js [DEPRECATED] b/.eslintrc.js [DEPRECATED] new file mode 100644 index 0000000..8ebc3c0 --- /dev/null +++ b/.eslintrc.js [DEPRECATED] @@ -0,0 +1,88 @@ +/* eslint-disable quotes */ + +module.exports = { + "root": true, + + "env": { + "browser": true, + "es6": true, + "greasemonkey": true, + "jquery": true, + // "node": true + }, + + "parserOptions": { + // "ecmaVersion": 12, + "ecmaVersion": "latest", + "sourceType": "script", + "ecmaFeatures": { + "globalReturn ": true, + "impliedStrict": true, + // "jsx": true, + }, + }, + + // "extends": "eslint:all", + // "extends": "eslint:recommended", + "extends": [ + "eslint:recommended", + // "eslint:all", + "plugin:css/recommended", + "plugin:jsonc/recommended-with-json", + // "plugin:no-jquery/recommended", + "plugin:no-jquery/deprecated", + // "plugin:no-jquery/slim", + // "plugin:no-jquery/all", + // "plugin:clean-regex/recommended" + "plugin:regexp/recommended", + // "plugin:regexp/all", + ], + + "plugins": [ + "css", + "jsonc", + // "clean-regex", + "no-jquery", + "regexp", + ], + + "rules": { + "complexity": ["warn", 20], + "eqeqeq": "warn", + "func-style": "off", + // "indent": ["warn","tab" ], + // "indent": ["warn","tab", { "SwitchCase": 1 } ], + // "indent": ["warn","tab", { "ignoreComments": true, "SwitchCase": 1 } ], + "indent": ["warn","tab", { "ignoreComments": false, "SwitchCase": 1 } ], + "linebreak-style": ["warn","unix"], + "max-len": "off", + "max-statements-per-line": "off", + "new-cap": "off", + "no-alert": "warn", + "no-console": "warn", + "no-dupe-keys": "warn", + "no-extra-semi": "warn", + "no-inline-comments": "off", + "no-magic-numbers": "off", + "no-misleading-character-class": "warn", + "no-mixed-spaces-and-tabs": "warn", + // "no-var": "off", + "no-multiple-empty-lines": "off", + "no-tabs": "off", + "no-unused-labels": "warn", + "no-unused-vars": ["warn", {"vars": "all", "args": "after-used"}], + "no-useless-escape": "warn", + "padded-blocks": "off", + "quotes": ["warn", "single", { "allowTemplateLiterals": true }] , + "require-jsdoc": "off", + "require-unicode-regexp": "off", + "semi": ["warn","always"], + // "strict": ["error", "global"], + "space-before-function-paren": "off", + // "space-in-parens": ["warn", "always"], + "unicode-bom": ["warn", "never"], + }, + + "reportUnusedDisableDirectives": true + +}; diff --git a/.eslintrc.js b/.eslintrc.json [DEPRECATED] similarity index 66% rename from .eslintrc.js rename to .eslintrc.json [DEPRECATED] index 079d09a..a34a4d6 100644 --- a/.eslintrc.js +++ b/.eslintrc.json [DEPRECATED] @@ -1,31 +1,44 @@ -module.exports = { +{ + "root": true, "env": { "browser": true, "es6": true, "greasemonkey": true, - "jquery": true, - "node": true, + "jquery": true }, - "extends": "eslint:recommended", "parserOptions": { - "ecmaVersion": 10, + "ecmaVersion": "latest", "sourceType": "script", "ecmaFeatures": { "globalReturn ": true, - "impliedStrict": true, - }, + "impliedStrict": true + } }, + "extends": [ + "eslint:recommended", + "plugin:css/recommended", + "plugin:jsonc/recommended-with-json", + "plugin:no-jquery/deprecated", + "plugin:regexp/recommended" + ], + "plugins": [ + "css", + "jsonc", + "no-jquery", + "regexp" + ], "rules": { "complexity": ["warn", 20], "eqeqeq": "warn", "func-style": "off", - "indent": ["warn","tab", { "ignoreComments": true, "SwitchCase": 1 } ], + "indent": ["warn","tab", { "ignoreComments": false, "SwitchCase": 1 } ], "linebreak-style": ["warn","unix"], "max-len": "off", "max-statements-per-line": "off", "new-cap": "off", "no-alert": "warn", "no-console": "warn", + "no-dupe-keys": "warn", "no-extra-semi": "warn", "no-inline-comments": "off", "no-magic-numbers": "off", @@ -39,9 +52,10 @@ module.exports = { "padded-blocks": "off", "quotes": ["warn", "single", { "allowTemplateLiterals": true }] , "require-jsdoc": "off", + "require-unicode-regexp": "off", "semi": ["warn","always"], "space-before-function-paren": "off", "unicode-bom": ["warn", "never"] - - } -}; + }, + "reportUnusedDisableDirectives": true +} diff --git a/.gitattributes b/.gitattributes index bdb0cab..1e78b8c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ # Auto detect text files and perform LF normalization -* text=auto +* text=auto eol=lf # Custom for Visual Studio *.cs diff=csharp diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index ca2da6f..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..eaba567 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,58 @@ +name: 🐛 Report a bug +description: File a bug report +title: "[script title] " +labels: bug +body: + - type: markdown + attributes: + value: | + # Thanks for reporting a bug! ⛰ + + Help us replicate the issue by filling in this form. + - type: checkboxes + id: terms + attributes: + label: "Please ensure:" + options: + - label: "I included in the issue title the script name I'm referring to." + required: true + - label: I performed a search of the [issue tracker](https://github.com/darkred/Userscripts/issues) and in the relevant Greasyfork [feedback page](https://greasyfork.org/en/users/2160-darkred?sort=updated) to avoid opening a duplicate issue. + required: true + - label: The bug is caused by the script itself. It doesn't happen if I disable the script, or in a fresh browser profile. + required: true + - type: checkboxes + attributes: + label: 'Include in this issue:' + options: + - label: Screenshots/video/gif demonstrating the bug, if it’s visual + - label: Console errors, if any + - type: textarea + id: the-problem + attributes: + label: Describe the problem and how to replicate it + validations: + required: true + - type: input + id: example-url + attributes: + label: Example URL + description: A REAL URL where the bug appears. + placeholder: https://example.com/page1.htm + validations: + required: true + - type: input + id: script-manager + attributes: + label: Script Manager + description: (Tampermonkey and Violentmonkey are supported - Greasemonkey is NOT supported) + placeholder: e.g. Tampermonkey 4.14 + validations: + required: true + - type: input + id: browsers + attributes: + label: Browser(s) used + description: (make sure it is the latest version - old versions are NOT supported) + placeholder: e.g. Chrome 92 + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md.old b/.github/ISSUE_TEMPLATE/feature_request.md.old new file mode 100644 index 0000000..f8b7ea6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md.old @@ -0,0 +1,16 @@ +--- +name: 🆕 Suggest an improvement or new feature +about: ——— +title: '' +labels: enhancement, under discussion +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..45791c0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,32 @@ +name: 🆕 Suggest an improvement or new feature +description: ——— +title: "[script title] " +labels: enhancement, under discussion +body: + - type: checkboxes + id: terms + attributes: + label: "Please ensure:" + options: + - label: "I included in the issue title the script name I'm referring to." + required: true + - label: "Before you request from me to write a new script for you, check in https://greasyfork.org/en/scripts and https://openuserjs.org/ : what you ask might be there already." + required: false + - type: textarea + attributes: + label: Description + description: "Try to be as specific as possible, don't make me have to guess what your suggested improvement or feature is." + validations: + required: true + - type: textarea + attributes: + label: Screenshot + description: You can provide screenshots/mockups to better visualize your idea. Files can be dropped in this field + - type: input + attributes: + label: Example URL + description: Include a REAL URL where the feature should appear. Paste a link here + placeholder: https://example.com/index.html + value: https:// + validations: + required: true diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..75d11ec --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" # Check for updates to GitHub Actions every week diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..b9d6d20 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,14 @@ +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v4 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/evergreen.yml b/.github/workflows/evergreen.yml new file mode 100644 index 0000000..57eb768 --- /dev/null +++ b/.github/workflows/evergreen.yml @@ -0,0 +1,22 @@ +name: Weekly dependabot checks + +on: + workflow_dispatch: + schedule: + - cron: '3 2 1 * *' + +permissions: + issues: write + pull-requests: write + +jobs: + evergreen: + name: evergreen + runs-on: ubuntu-latest + + steps: + - name: Run evergreen action + uses: github/evergreen@v1 + env: + GH_TOKEN: ${{ secrets.EVERGREEN_ACTION }} + REPOSITORY: darkred diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..f2415f5 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +# from https://github.com/tophf/mpiv/blob/master/.github/workflows/lint.yml +# and https://github.com/stefanoeb/eslint-action/blob/master/README.md + +name: ESLint + +on: + push: + branches: [ master ] + paths-ignore: + - '.github/**' # this yml is also excluded so you need to re-run it explicitly if necessary + - .editorconfig + - LICENSE + - README.md + pull_request: + branches: [ master ] + paths-ignore: + - '.github/**' # this yml is also excluded so you need to re-run it explicitly if necessary + - .editorconfig + - LICENSE + - README.md + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install modules + run: npm install + - name: Run ESLint + run: npx eslint . --ext .user.js diff --git a/.gitignore b/.gitignore index cd2946a..fe04e22 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,9 @@ $RECYCLE.BIN/ Network Trash Folder Temporary Items .apdisk + + +node_modules/ + +# lockfiles +package-lock.json diff --git a/1337X_-_convert_torrent_timestamps_to_relative_format/1337X_-_convert_torrent_timestamps_to_relative_format.user.js b/1337X_-_convert_torrent_timestamps_to_relative_format/1337X_-_convert_torrent_timestamps_to_relative_format.user.js new file mode 100644 index 0000000..5eee4ab --- /dev/null +++ b/1337X_-_convert_torrent_timestamps_to_relative_format/1337X_-_convert_torrent_timestamps_to_relative_format.user.js @@ -0,0 +1,110 @@ +// ==UserScript== +// @name 1337X - convert torrent timestamps to relative format +// @namespace darkred +// @version 2021.7.14.1 +// @description Converts torrent upload timestamps to relative format +// @author darkred +// @license MIT +// @include /^https:\/\/(www\.)?1337x\.(to|st|ws|eu|se|is|gd|unblocked\.dk)((?!\/torrent)).*$/ +// @grant none +// @require https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js +// @require https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.31/moment-timezone-with-data-10-year-range.min.js +// @supportURL https://github.com/darkred/Userscripts/issues +// ==/UserScript== + +// Official mirrors list: https://1337x.to/about + +'use strict'; +/* global moment */ + + + + + +// 11:59am ---> h:hha +// 10am Oct. 30th ---> haA MMM. Do +// 11pm Nov. 4th +// Oct. 31st '20 + + + +// Based on the timestamp on the footer of each RARBG page --> "Sat, 01 May 2020 20:14:56 +0200", +// the script takes that the server time is GMT+2 and that it doesn't take DST. +// Also, the script uses the 'moment-timezone' library as it takes DST offsets into account when converting the timestamps to user/local timezone. + +// This is no typo: +// const serverTimezone = 'Etc/GMT+2'; // -02:00 -02:00 (=no DST) +// const serverTimezone = 'Etc/GMT-2'; // +02:00 +02:00 (=no DST) +const serverTimezone = 'Etc/GMT-1'; // +01:00 +01:00 (=no DST) + +// const serverTimezone = 'Etc/GMT-1'; + +const localTimezone = moment.tz.guess(); // In my case ----> +02:00 +03:00 (DST) + +// const format = 'MM/DD/YYYY HH:mm:ss'; +// const format = 'YYYY-MM-DD HH:mm:ss'; +moment.locale('en'); +const format = ['h:mma', 'ha MMM. Do', 'MMM. Do \'YY']; +const formatTooltip1 = 'h:mma'; // the 1st element of the above array. +const formatTooltip2 = 'ha MMM. Do'; // the 2st element of the array (there can be no 3rd format, e.g. Oct. 31st '20 is only date, not time ). + +// Customize the strings in the locale to display "1 minute ago" instead of "a minute ago" (https://github.com/moment/moment/issues/3764#issuecomment-279928245) +moment.updateLocale('en', { + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'seconds', + m: '1 minute', + mm: '%d minutes', + h: '1 hour', + hh: '%d hours', + d: '1 day', + dd: '%d days', + M: '1 month', + MM: '%d months', + y: '1 year', + yy: '%d years' + } +}); + + +function convertToLocalTimezone(timestamps) { + for (let i = 0; i < timestamps.length; i++) { + let initialTimestamp = timestamps[i].textContent; + if (moment(initialTimestamp, format, true).isValid()) { // As of moment.js v2.3.0, you may specify a boolean for the last argument to make Moment use strict parsing. Strict parsing requires that the format and input match exactly, including delimeters. + let convertedToLocalTimezone = moment.tz(initialTimestamp, format, serverTimezone).tz(localTimezone); + timestamps[i].textContent = convertedToLocalTimezone.fromNow(); + + // timestamps[i].title = initialTimestamp; + if (moment(initialTimestamp, formatTooltip1, true).isValid()) { + timestamps[i].title = convertedToLocalTimezone.format(formatTooltip1); + } else if (moment(initialTimestamp, formatTooltip2, true).isValid()) { + timestamps[i].title = convertedToLocalTimezone.format(formatTooltip2); + // timestamps[i].title = convertedToLocalTimezone.toISOString(); // Display timestamps in tooltips in ISO 8601 format, combining date and time (https://stackoverflow.com/questions/25725019/how-do-i-format-a-date-as-iso-8601-in-moment-js/) + } + } + } + + + // recalculate the relative dates every 1 min + (function(){ + for (let i = 0; i < timestamps.length; i++) { + // timestamps[i].textContent = moment(timestamps[i].title).fromNow(); + + if (timestamps[i].title !== '') { + let tooltipValue = timestamps[i].title; + let convertedToLocalTimezone = moment(tooltipValue, format); // no need to reconvert, it's already in local timezone + timestamps[i].textContent = convertedToLocalTimezone.fromNow(); + } + + } + // setTimeout(arguments.callee, 10 * 1000); // 10 * 1000 msec = 10 sec = 1/6 min + setTimeout(arguments.callee, 60 * 1000); // 60 * 1000 msec = 1 min + })(); + + +} + +// const timestamps = document.querySelectorAll('tr.lista2 td:nth-child(3)'); +const timestamps = document.querySelectorAll('tbody .coll-date'); +convertToLocalTimezone(timestamps); diff --git a/1337X_-_convert_torrent_timestamps_to_relative_format/README.md b/1337X_-_convert_torrent_timestamps_to_relative_format/README.md new file mode 100644 index 0000000..abc5eb9 --- /dev/null +++ b/1337X_-_convert_torrent_timestamps_to_relative_format/README.md @@ -0,0 +1,13 @@ +This script applies to 1337X torrent lists. +- it converts torrent timestamps to relative format in local timezone. Also, it recalculates them every 1 min. +- The initial timestamps are still available as tooltips (on mouse hover), also converted to local timezone. + +It uses [moment.js](http://momentjs.com/) and [moment-timezone.js](http://momentjs.com/timezone/). + +Screenshot comparison: +Initial: +![](https://i.imgur.com/ZcEdXNI.jpg) +With the script: +![](https://i.imgur.com/1I027xL.jpg) + +[Hosted in GitHub](https://github.com/darkred/Userscripts) diff --git a/1337X_-_convert_torrent_timestamps_to_relative_format/moment-timezone-with-data-10-year-range.min.js b/1337X_-_convert_torrent_timestamps_to_relative_format/moment-timezone-with-data-10-year-range.min.js new file mode 100644 index 0000000..5173d52 --- /dev/null +++ b/1337X_-_convert_torrent_timestamps_to_relative_format/moment-timezone-with-data-10-year-range.min.js @@ -0,0 +1 @@ +!function(a,i){"use strict";"object"==typeof module&&module.exports?module.exports=i(require("moment")):"function"==typeof define&&define.amd?define(["moment"],i):i(a.moment)}(this,function(c){"use strict";void 0===c.version&&c.default&&(c=c.default);var i,A={},n={},t={},s={},u={};c&&"string"==typeof c.version||O("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var a=c.version.split("."),e=+a[0],r=+a[1];function m(a){return 96= 2.6.0. You are using Moment.js "+c.version+". See momentjs.com"),M.prototype={_set:function(a){this.name=a.name,this.abbrs=a.abbrs,this.untils=a.untils,this.offsets=a.offsets,this.population=a.population},_index:function(a){var i,e=+a,r=this.untils;for(i=0;i= 2.9.0. You are using Moment.js "+c.version+"."),c.defaultZone=a?_(a):null,c};var G=c.momentProperties;return"[object Array]"===Object.prototype.toString.call(G)?(G.push("_z"),G.push("_a")):G&&(G._z=null),B({version:"2020a",zones:["Africa/Abidjan|GMT|0|0||48e5","Africa/Nairobi|EAT|-30|0||47e5","Africa/Algiers|CET|-10|0||26e5","Africa/Lagos|WAT|-10|0||17e6","Africa/Maputo|CAT|-20|0||26e5","Africa/Cairo|EET|-20|0||15e6","Africa/Casablanca|+00 +01|0 -10|010101010101010101010101010101|1O9e0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0|32e5","Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6","Africa/Johannesburg|SAST|-20|0||84e5","Africa/Khartoum|EAT CAT|-30 -20|01|1Usl0|51e5","Africa/Sao_Tome|GMT WAT|0 -10|010|1UQN0 2q00|","Africa/Windhoek|CAT WAT|-20 -10|0101010|1Oc00 11B0 1nX0 11B0 1nX0 11B0|32e4","America/Adak|HST HDT|a0 90|01010101010101010101010|1O100 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326","America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1O0X0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4","America/Santo_Domingo|AST|40|0||29e5","America/Fortaleza|-03|30|0||34e5","America/Asuncion|-03 -04|30 40|01010101010101010101010|1O6r0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0|28e5","America/Panama|EST|50|0||15e5","America/Mexico_City|CST CDT|60 50|01010101010101010101010|1Oc80 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6","America/Managua|CST|60|0||22e5","America/La_Paz|-04|40|0||19e5","America/Lima|-05|50|0||11e6","America/Denver|MST MDT|70 60|01010101010101010101010|1O0V0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5","America/Campo_Grande|-03 -04|30 40|0101010101|1NTf0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4","America/Cancun|CST EST|60 50|01|1NKU0|63e4","America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5","America/Chicago|CST CDT|60 50|01010101010101010101010|1O0U0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5","America/Chihuahua|MST MDT|70 60|01010101010101010101010|1Oc90 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4","America/Phoenix|MST|70|0||42e5","America/Whitehorse|PST PDT MST|80 70 70|010101010102|1O0W0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|23e3","America/New_York|EST EDT|50 40|01010101010101010101010|1O0T0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6","America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1O0W0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6","America/Fort_Nelson|PST MST|80 70|01|1O0W0|39e2","America/Halifax|AST ADT|40 30|01010101010101010101010|1O0S0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4","America/Godthab|-03 -02|30 20|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3","America/Grand_Turk|EST EDT AST|50 40 40|0121010101010101010|1O0T0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2","America/Havana|CST CDT|50 40|01010101010101010101010|1O0R0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5","America/Metlakatla|PST AKST AKDT|80 90 80|01212120121212121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2","America/Miquelon|-03 -02|30 20|01010101010101010101010|1O0R0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2","America/Montevideo|-02 -03|20 30|01|1O0Q0|17e5","America/Noronha|-02|20|0||30e2","America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1O0T0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5","Antarctica/Palmer|-03 -04|30 40|010|1QSr0 Ap0|40","America/Santiago|-03 -04|30 40|010101010101010101010|1QSr0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0|62e5","America/Sao_Paulo|-02 -03|20 30|0101010101|1NTe0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6","Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4","America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1O0Ru 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4","Antarctica/Casey|+08 +11|-80 -b0|010|1RWg0 3m10|10","Asia/Bangkok|+07|-70|0||15e6","Asia/Vladivostok|+10|-a0|0||60e4","Pacific/Bougainville|+11|-b0|0||18e4","Asia/Tashkent|+05|-50|0||23e5","Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1ObO0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00|14e5","Asia/Baghdad|+03|-30|0||66e5","Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40","Asia/Dhaka|+06|-60|0||16e6","Asia/Amman|EET EEST|-20 -30|01010101010101010101010|1O8m0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0|25e5","Asia/Kamchatka|+12|-c0|0||18e4","Asia/Baku|+04 +05|-40 -50|010|1O9c0 1o00|27e5","Asia/Barnaul|+06 +07|-60 -70|01|1QyI0|","Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1O9a0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5","Asia/Kuala_Lumpur|+08|-80|0||71e5","Asia/Kolkata|IST|-5u|0||15e6","Asia/Chita|+08 +09|-80 -90|01|1QyG0|33e4","Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5","Asia/Shanghai|CST|-80|0||23e6","Asia/Colombo|+0530|-5u|0||22e5","Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1O8m0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0|26e5","Asia/Yakutsk|+09|-90|0||28e4","Asia/Dubai|+04|-40|0||39e5","Asia/Famagusta|EET EEST +03|-20 -30 -30|0101201010101010101010|1O9d0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|","Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1O8K0 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 11c0 1oo0 11c0 1rc0 Wo0 1rc0 Wo0 1rc0 11c0 1oo0 11c0 1oo0 11c0 1oo0|18e5","Asia/Hong_Kong|HKT|-80|0||73e5","Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3","Europe/Istanbul|EET EEST +03|-20 -30 -30|01012|1O9d0 1tA0 U00 15w0|13e6","Asia/Jakarta|WIB|-70|0||31e6","Asia/Jayapura|WIT|-90|0||26e4","Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1O8o0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4","Asia/Kabul|+0430|-4u|0||46e5","Asia/Karachi|PKT|-50|0||24e6","Asia/Kathmandu|+0545|-5J|0||12e5","Asia/Magadan|+10 +11|-a0 -b0|01|1QJQ0|95e3","Asia/Makassar|WITA|-80|0||15e5","Asia/Manila|PST|-80|0||24e6","Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5","Asia/Novosibirsk|+06 +07|-60 -70|01|1Rmk0|15e5","Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BA0|29e5","Asia/Qyzylorda|+06 +05|-60 -50|01|1Xei0|73e4","Asia/Rangoon|+0630|-6u|0||48e5","Asia/Sakhalin|+10 +11|-a0 -b0|01|1QyE0|58e4","Asia/Seoul|KST|-90|0||23e6","Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1O6ku 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0|14e6","Asia/Tokyo|JST|-90|0||38e6","Asia/Tomsk|+06 +07|-60 -70|01|1QXU0|10e5","Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5","Atlantic/Cape_Verde|-01|10|0||50e4","Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1ObQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0|40e5","Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1ObQu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0|11e5","Australia/Brisbane|AEST|-a0|0||20e5","Australia/Darwin|ACST|-9u|0||12e4","Australia/Eucla|+0845|-8J|0||368","Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1ObP0 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu|347","Australia/Perth|AWST|-80|0||18e5","Pacific/Easter|-05 -06|50 60|010101010101010101010|1QSr0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0|30e2","Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5","Etc/GMT-1|+01|-10|0||","Pacific/Fakaofo|+13|-d0|0||483","Pacific/Kiritimati|+14|-e0|0||51e2","Etc/GMT-2|+02|-20|0||","Pacific/Tahiti|-10|a0|0||18e4","Pacific/Niue|-11|b0|0||12e2","Etc/GMT+12|-12|c0|0||","Pacific/Galapagos|-06|60|0||25e3","Etc/GMT+7|-07|70|0||","Pacific/Pitcairn|-08|80|0||56","Pacific/Gambier|-09|90|0||125","Etc/UTC|UTC|0|0||","Europe/Ulyanovsk|+03 +04|-30 -40|01|1QyL0|13e5","Europe/London|GMT BST|0 -10|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6","Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1O9c0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4","Europe/Moscow|MSK|-30|0||16e6","Europe/Saratov|+03 +04|-30 -40|01|1Sfz0|","Europe/Volgograd|+03 +04|-30 -40|01|1WQL0|10e5","Pacific/Honolulu|HST|a0|0||37e4","MET|MET MEST|-10 -20|01010101010101010101010|1O9d0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|","Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1ObO0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00|600","Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1ObO0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00|37e3","Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1NF20 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 20o0 pc0 20o0 s00 20o0 pc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0|88e4","Pacific/Guam|ChST|-a0|0||17e4","Pacific/Marquesas|-0930|9u|0||86e2","Pacific/Pago_Pago|SST|b0|0||37e2","Pacific/Norfolk|+1130 +11 +12|-bu -b0 -c0|012121212121212|1PoCu 9Jcu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0|25e4","Pacific/Tongatapu|+13 +14|-d0 -e0|010|1S4d0 s00|75e3"],links:["Africa/Abidjan|Africa/Accra","Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Bissau","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Monrovia","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|America/Danmarkshavn","Africa/Abidjan|Atlantic/Reykjavik","Africa/Abidjan|Atlantic/St_Helena","Africa/Abidjan|Etc/GMT","Africa/Abidjan|Etc/GMT+0","Africa/Abidjan|Etc/GMT-0","Africa/Abidjan|Etc/GMT0","Africa/Abidjan|Etc/Greenwich","Africa/Abidjan|GMT","Africa/Abidjan|GMT+0","Africa/Abidjan|GMT-0","Africa/Abidjan|GMT0","Africa/Abidjan|Greenwich","Africa/Abidjan|Iceland","Africa/Algiers|Africa/Tunis","Africa/Cairo|Africa/Tripoli","Africa/Cairo|Egypt","Africa/Cairo|Europe/Kaliningrad","Africa/Cairo|Libya","Africa/Casablanca|Africa/El_Aaiun","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Ndjamena","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Juba","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|America/Juneau","America/Anchorage|America/Nome","America/Anchorage|America/Sitka","America/Anchorage|America/Yakutat","America/Anchorage|US/Alaska","America/Campo_Grande|America/Cuiaba","America/Chicago|America/Indiana/Knox","America/Chicago|America/Indiana/Tell_City","America/Chicago|America/Knox_IN","America/Chicago|America/Matamoros","America/Chicago|America/Menominee","America/Chicago|America/North_Dakota/Beulah","America/Chicago|America/North_Dakota/Center","America/Chicago|America/North_Dakota/New_Salem","America/Chicago|America/Rainy_River","America/Chicago|America/Rankin_Inlet","America/Chicago|America/Resolute","America/Chicago|America/Winnipeg","America/Chicago|CST6CDT","America/Chicago|Canada/Central","America/Chicago|US/Central","America/Chicago|US/Indiana-Starke","America/Chihuahua|America/Mazatlan","America/Chihuahua|Mexico/BajaSur","America/Denver|America/Boise","America/Denver|America/Cambridge_Bay","America/Denver|America/Edmonton","America/Denver|America/Inuvik","America/Denver|America/Ojinaga","America/Denver|America/Shiprock","America/Denver|America/Yellowknife","America/Denver|Canada/Mountain","America/Denver|MST7MDT","America/Denver|Navajo","America/Denver|US/Mountain","America/Fortaleza|America/Araguaina","America/Fortaleza|America/Argentina/Buenos_Aires","America/Fortaleza|America/Argentina/Catamarca","America/Fortaleza|America/Argentina/ComodRivadavia","America/Fortaleza|America/Argentina/Cordoba","America/Fortaleza|America/Argentina/Jujuy","America/Fortaleza|America/Argentina/La_Rioja","America/Fortaleza|America/Argentina/Mendoza","America/Fortaleza|America/Argentina/Rio_Gallegos","America/Fortaleza|America/Argentina/Salta","America/Fortaleza|America/Argentina/San_Juan","America/Fortaleza|America/Argentina/San_Luis","America/Fortaleza|America/Argentina/Tucuman","America/Fortaleza|America/Argentina/Ushuaia","America/Fortaleza|America/Bahia","America/Fortaleza|America/Belem","America/Fortaleza|America/Buenos_Aires","America/Fortaleza|America/Catamarca","America/Fortaleza|America/Cayenne","America/Fortaleza|America/Cordoba","America/Fortaleza|America/Jujuy","America/Fortaleza|America/Maceio","America/Fortaleza|America/Mendoza","America/Fortaleza|America/Paramaribo","America/Fortaleza|America/Recife","America/Fortaleza|America/Rosario","America/Fortaleza|America/Santarem","America/Fortaleza|Antarctica/Rothera","America/Fortaleza|Atlantic/Stanley","America/Fortaleza|Etc/GMT+3","America/Godthab|America/Nuuk","America/Halifax|America/Glace_Bay","America/Halifax|America/Goose_Bay","America/Halifax|America/Moncton","America/Halifax|America/Thule","America/Halifax|Atlantic/Bermuda","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/La_Paz|America/Boa_Vista","America/La_Paz|America/Guyana","America/La_Paz|America/Manaus","America/La_Paz|America/Porto_Velho","America/La_Paz|Brazil/West","America/La_Paz|Etc/GMT+4","America/Lima|America/Bogota","America/Lima|America/Eirunepe","America/Lima|America/Guayaquil","America/Lima|America/Porto_Acre","America/Lima|America/Rio_Branco","America/Lima|Brazil/Acre","America/Lima|Etc/GMT+5","America/Los_Angeles|America/Ensenada","America/Los_Angeles|America/Santa_Isabel","America/Los_Angeles|America/Tijuana","America/Los_Angeles|America/Vancouver","America/Los_Angeles|Canada/Pacific","America/Los_Angeles|Mexico/BajaNorte","America/Los_Angeles|PST8PDT","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Managua|America/Belize","America/Managua|America/Costa_Rica","America/Managua|America/El_Salvador","America/Managua|America/Guatemala","America/Managua|America/Regina","America/Managua|America/Swift_Current","America/Managua|America/Tegucigalpa","America/Managua|Canada/Saskatchewan","America/Mexico_City|America/Bahia_Banderas","America/Mexico_City|America/Merida","America/Mexico_City|America/Monterrey","America/Mexico_City|Mexico/General","America/New_York|America/Detroit","America/New_York|America/Fort_Wayne","America/New_York|America/Indiana/Indianapolis","America/New_York|America/Indiana/Marengo","America/New_York|America/Indiana/Petersburg","America/New_York|America/Indiana/Vevay","America/New_York|America/Indiana/Vincennes","America/New_York|America/Indiana/Winamac","America/New_York|America/Indianapolis","America/New_York|America/Iqaluit","America/New_York|America/Kentucky/Louisville","America/New_York|America/Kentucky/Monticello","America/New_York|America/Louisville","America/New_York|America/Montreal","America/New_York|America/Nassau","America/New_York|America/Nipigon","America/New_York|America/Pangnirtung","America/New_York|America/Thunder_Bay","America/New_York|America/Toronto","America/New_York|Canada/Eastern","America/New_York|EST5EDT","America/New_York|US/East-Indiana","America/New_York|US/Eastern","America/New_York|US/Michigan","America/Noronha|Atlantic/South_Georgia","America/Noronha|Brazil/DeNoronha","America/Noronha|Etc/GMT+2","America/Panama|America/Atikokan","America/Panama|America/Cayman","America/Panama|America/Coral_Harbour","America/Panama|America/Jamaica","America/Panama|EST","America/Panama|Jamaica","America/Phoenix|America/Creston","America/Phoenix|America/Dawson_Creek","America/Phoenix|America/Hermosillo","America/Phoenix|MST","America/Phoenix|US/Arizona","America/Santiago|Chile/Continental","America/Santo_Domingo|America/Anguilla","America/Santo_Domingo|America/Antigua","America/Santo_Domingo|America/Aruba","America/Santo_Domingo|America/Barbados","America/Santo_Domingo|America/Blanc-Sablon","America/Santo_Domingo|America/Curacao","America/Santo_Domingo|America/Dominica","America/Santo_Domingo|America/Grenada","America/Santo_Domingo|America/Guadeloupe","America/Santo_Domingo|America/Kralendijk","America/Santo_Domingo|America/Lower_Princes","America/Santo_Domingo|America/Marigot","America/Santo_Domingo|America/Martinique","America/Santo_Domingo|America/Montserrat","America/Santo_Domingo|America/Port_of_Spain","America/Santo_Domingo|America/Puerto_Rico","America/Santo_Domingo|America/St_Barthelemy","America/Santo_Domingo|America/St_Kitts","America/Santo_Domingo|America/St_Lucia","America/Santo_Domingo|America/St_Thomas","America/Santo_Domingo|America/St_Vincent","America/Santo_Domingo|America/Tortola","America/Santo_Domingo|America/Virgin","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Whitehorse|America/Dawson","America/Whitehorse|Canada/Yukon","Antarctica/Palmer|America/Punta_Arenas","Asia/Baghdad|Antarctica/Syowa","Asia/Baghdad|Asia/Aden","Asia/Baghdad|Asia/Bahrain","Asia/Baghdad|Asia/Kuwait","Asia/Baghdad|Asia/Qatar","Asia/Baghdad|Asia/Riyadh","Asia/Baghdad|Etc/GMT-3","Asia/Baghdad|Europe/Kirov","Asia/Baghdad|Europe/Minsk","Asia/Bangkok|Antarctica/Davis","Asia/Bangkok|Asia/Ho_Chi_Minh","Asia/Bangkok|Asia/Krasnoyarsk","Asia/Bangkok|Asia/Novokuznetsk","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Saigon","Asia/Bangkok|Asia/Vientiane","Asia/Bangkok|Etc/GMT-7","Asia/Bangkok|Indian/Christmas","Asia/Dhaka|Antarctica/Vostok","Asia/Dhaka|Asia/Almaty","Asia/Dhaka|Asia/Bishkek","Asia/Dhaka|Asia/Dacca","Asia/Dhaka|Asia/Kashgar","Asia/Dhaka|Asia/Omsk","Asia/Dhaka|Asia/Qostanay","Asia/Dhaka|Asia/Thimbu","Asia/Dhaka|Asia/Thimphu","Asia/Dhaka|Asia/Urumqi","Asia/Dhaka|Etc/GMT-6","Asia/Dhaka|Indian/Chagos","Asia/Dubai|Asia/Muscat","Asia/Dubai|Asia/Tbilisi","Asia/Dubai|Asia/Yerevan","Asia/Dubai|Etc/GMT-4","Asia/Dubai|Europe/Samara","Asia/Dubai|Indian/Mahe","Asia/Dubai|Indian/Mauritius","Asia/Dubai|Indian/Reunion","Asia/Gaza|Asia/Hebron","Asia/Hong_Kong|Hongkong","Asia/Jakarta|Asia/Pontianak","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kamchatka|Asia/Anadyr","Asia/Kamchatka|Etc/GMT-12","Asia/Kamchatka|Kwajalein","Asia/Kamchatka|Pacific/Funafuti","Asia/Kamchatka|Pacific/Kwajalein","Asia/Kamchatka|Pacific/Majuro","Asia/Kamchatka|Pacific/Nauru","Asia/Kamchatka|Pacific/Tarawa","Asia/Kamchatka|Pacific/Wake","Asia/Kamchatka|Pacific/Wallis","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Kuala_Lumpur|Asia/Brunei","Asia/Kuala_Lumpur|Asia/Irkutsk","Asia/Kuala_Lumpur|Asia/Kuching","Asia/Kuala_Lumpur|Asia/Singapore","Asia/Kuala_Lumpur|Etc/GMT-8","Asia/Kuala_Lumpur|Singapore","Asia/Makassar|Asia/Ujung_Pandang","Asia/Rangoon|Asia/Yangon","Asia/Rangoon|Indian/Cocos","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|Asia/Macao","Asia/Shanghai|Asia/Macau","Asia/Shanghai|Asia/Taipei","Asia/Shanghai|PRC","Asia/Shanghai|ROC","Asia/Tashkent|Antarctica/Mawson","Asia/Tashkent|Asia/Aqtau","Asia/Tashkent|Asia/Aqtobe","Asia/Tashkent|Asia/Ashgabat","Asia/Tashkent|Asia/Ashkhabad","Asia/Tashkent|Asia/Atyrau","Asia/Tashkent|Asia/Dushanbe","Asia/Tashkent|Asia/Oral","Asia/Tashkent|Asia/Samarkand","Asia/Tashkent|Asia/Yekaterinburg","Asia/Tashkent|Etc/GMT-5","Asia/Tashkent|Indian/Kerguelen","Asia/Tashkent|Indian/Maldives","Asia/Tehran|Iran","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Choibalsan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Vladivostok|Antarctica/DumontDUrville","Asia/Vladivostok|Asia/Ust-Nera","Asia/Vladivostok|Etc/GMT-10","Asia/Vladivostok|Pacific/Chuuk","Asia/Vladivostok|Pacific/Port_Moresby","Asia/Vladivostok|Pacific/Truk","Asia/Vladivostok|Pacific/Yap","Asia/Yakutsk|Asia/Dili","Asia/Yakutsk|Asia/Khandyga","Asia/Yakutsk|Etc/GMT-9","Asia/Yakutsk|Pacific/Palau","Atlantic/Azores|America/Scoresbysund","Atlantic/Cape_Verde|Etc/GMT+1","Australia/Adelaide|Australia/Broken_Hill","Australia/Adelaide|Australia/South","Australia/Adelaide|Australia/Yancowinna","Australia/Brisbane|Australia/Lindeman","Australia/Brisbane|Australia/Queensland","Australia/Darwin|Australia/North","Australia/Lord_Howe|Australia/LHI","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/Currie","Australia/Sydney|Australia/Hobart","Australia/Sydney|Australia/Melbourne","Australia/Sydney|Australia/NSW","Australia/Sydney|Australia/Tasmania","Australia/Sydney|Australia/Victoria","Etc/UTC|Etc/UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UCT","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Athens|Asia/Nicosia","Europe/Athens|EET","Europe/Athens|Europe/Bucharest","Europe/Athens|Europe/Helsinki","Europe/Athens|Europe/Kiev","Europe/Athens|Europe/Mariehamn","Europe/Athens|Europe/Nicosia","Europe/Athens|Europe/Riga","Europe/Athens|Europe/Sofia","Europe/Athens|Europe/Tallinn","Europe/Athens|Europe/Uzhgorod","Europe/Athens|Europe/Vilnius","Europe/Athens|Europe/Zaporozhye","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Atlantic/Canary","Europe/Lisbon|Atlantic/Faeroe","Europe/Lisbon|Atlantic/Faroe","Europe/Lisbon|Atlantic/Madeira","Europe/Lisbon|Portugal","Europe/Lisbon|WET","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|Europe/Simferopol","Europe/Moscow|W-SU","Europe/Paris|Africa/Ceuta","Europe/Paris|Arctic/Longyearbyen","Europe/Paris|Atlantic/Jan_Mayen","Europe/Paris|CET","Europe/Paris|Europe/Amsterdam","Europe/Paris|Europe/Andorra","Europe/Paris|Europe/Belgrade","Europe/Paris|Europe/Berlin","Europe/Paris|Europe/Bratislava","Europe/Paris|Europe/Brussels","Europe/Paris|Europe/Budapest","Europe/Paris|Europe/Busingen","Europe/Paris|Europe/Copenhagen","Europe/Paris|Europe/Gibraltar","Europe/Paris|Europe/Ljubljana","Europe/Paris|Europe/Luxembourg","Europe/Paris|Europe/Madrid","Europe/Paris|Europe/Malta","Europe/Paris|Europe/Monaco","Europe/Paris|Europe/Oslo","Europe/Paris|Europe/Podgorica","Europe/Paris|Europe/Prague","Europe/Paris|Europe/Rome","Europe/Paris|Europe/San_Marino","Europe/Paris|Europe/Sarajevo","Europe/Paris|Europe/Skopje","Europe/Paris|Europe/Stockholm","Europe/Paris|Europe/Tirane","Europe/Paris|Europe/Vaduz","Europe/Paris|Europe/Vatican","Europe/Paris|Europe/Vienna","Europe/Paris|Europe/Warsaw","Europe/Paris|Europe/Zagreb","Europe/Paris|Europe/Zurich","Europe/Paris|Poland","Europe/Ulyanovsk|Europe/Astrakhan","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Bougainville|Antarctica/Macquarie","Pacific/Bougainville|Asia/Srednekolymsk","Pacific/Bougainville|Etc/GMT-11","Pacific/Bougainville|Pacific/Efate","Pacific/Bougainville|Pacific/Guadalcanal","Pacific/Bougainville|Pacific/Kosrae","Pacific/Bougainville|Pacific/Noumea","Pacific/Bougainville|Pacific/Pohnpei","Pacific/Bougainville|Pacific/Ponape","Pacific/Chatham|NZ-CHAT","Pacific/Easter|Chile/EasterIsland","Pacific/Fakaofo|Etc/GMT-13","Pacific/Fakaofo|Pacific/Enderbury","Pacific/Galapagos|Etc/GMT+6","Pacific/Gambier|Etc/GMT+9","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|HST","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kiritimati|Etc/GMT-14","Pacific/Niue|Etc/GMT+11","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Pitcairn|Etc/GMT+8","Pacific/Tahiti|Etc/GMT+10","Pacific/Tahiti|Pacific/Rarotonga"],countries:["AD|Europe/Andorra","AE|Asia/Dubai","AF|Asia/Kabul","AG|America/Port_of_Spain America/Antigua","AI|America/Port_of_Spain America/Anguilla","AL|Europe/Tirane","AM|Asia/Yerevan","AO|Africa/Lagos Africa/Luanda","AQ|Antarctica/Casey Antarctica/Davis Antarctica/DumontDUrville Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Syowa Antarctica/Troll Antarctica/Vostok Pacific/Auckland Antarctica/McMurdo","AR|America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Salta America/Argentina/Jujuy America/Argentina/Tucuman America/Argentina/Catamarca America/Argentina/La_Rioja America/Argentina/San_Juan America/Argentina/Mendoza America/Argentina/San_Luis America/Argentina/Rio_Gallegos America/Argentina/Ushuaia","AS|Pacific/Pago_Pago","AT|Europe/Vienna","AU|Australia/Lord_Howe Antarctica/Macquarie Australia/Hobart Australia/Currie Australia/Melbourne Australia/Sydney Australia/Broken_Hill Australia/Brisbane Australia/Lindeman Australia/Adelaide Australia/Darwin Australia/Perth Australia/Eucla","AW|America/Curacao America/Aruba","AX|Europe/Helsinki Europe/Mariehamn","AZ|Asia/Baku","BA|Europe/Belgrade Europe/Sarajevo","BB|America/Barbados","BD|Asia/Dhaka","BE|Europe/Brussels","BF|Africa/Abidjan Africa/Ouagadougou","BG|Europe/Sofia","BH|Asia/Qatar Asia/Bahrain","BI|Africa/Maputo Africa/Bujumbura","BJ|Africa/Lagos Africa/Porto-Novo","BL|America/Port_of_Spain America/St_Barthelemy","BM|Atlantic/Bermuda","BN|Asia/Brunei","BO|America/La_Paz","BQ|America/Curacao America/Kralendijk","BR|America/Noronha America/Belem America/Fortaleza America/Recife America/Araguaina America/Maceio America/Bahia America/Sao_Paulo America/Campo_Grande America/Cuiaba America/Santarem America/Porto_Velho America/Boa_Vista America/Manaus America/Eirunepe America/Rio_Branco","BS|America/Nassau","BT|Asia/Thimphu","BW|Africa/Maputo Africa/Gaborone","BY|Europe/Minsk","BZ|America/Belize","CA|America/St_Johns America/Halifax America/Glace_Bay America/Moncton America/Goose_Bay America/Blanc-Sablon America/Toronto America/Nipigon America/Thunder_Bay America/Iqaluit America/Pangnirtung America/Atikokan America/Winnipeg America/Rainy_River America/Resolute America/Rankin_Inlet America/Regina America/Swift_Current America/Edmonton America/Cambridge_Bay America/Yellowknife America/Inuvik America/Creston America/Dawson_Creek America/Fort_Nelson America/Vancouver America/Whitehorse America/Dawson","CC|Indian/Cocos","CD|Africa/Maputo Africa/Lagos Africa/Kinshasa Africa/Lubumbashi","CF|Africa/Lagos Africa/Bangui","CG|Africa/Lagos Africa/Brazzaville","CH|Europe/Zurich","CI|Africa/Abidjan","CK|Pacific/Rarotonga","CL|America/Santiago America/Punta_Arenas Pacific/Easter","CM|Africa/Lagos Africa/Douala","CN|Asia/Shanghai Asia/Urumqi","CO|America/Bogota","CR|America/Costa_Rica","CU|America/Havana","CV|Atlantic/Cape_Verde","CW|America/Curacao","CX|Indian/Christmas","CY|Asia/Nicosia Asia/Famagusta","CZ|Europe/Prague","DE|Europe/Zurich Europe/Berlin Europe/Busingen","DJ|Africa/Nairobi Africa/Djibouti","DK|Europe/Copenhagen","DM|America/Port_of_Spain America/Dominica","DO|America/Santo_Domingo","DZ|Africa/Algiers","EC|America/Guayaquil Pacific/Galapagos","EE|Europe/Tallinn","EG|Africa/Cairo","EH|Africa/El_Aaiun","ER|Africa/Nairobi Africa/Asmara","ES|Europe/Madrid Africa/Ceuta Atlantic/Canary","ET|Africa/Nairobi Africa/Addis_Ababa","FI|Europe/Helsinki","FJ|Pacific/Fiji","FK|Atlantic/Stanley","FM|Pacific/Chuuk Pacific/Pohnpei Pacific/Kosrae","FO|Atlantic/Faroe","FR|Europe/Paris","GA|Africa/Lagos Africa/Libreville","GB|Europe/London","GD|America/Port_of_Spain America/Grenada","GE|Asia/Tbilisi","GF|America/Cayenne","GG|Europe/London Europe/Guernsey","GH|Africa/Accra","GI|Europe/Gibraltar","GL|America/Godthab America/Danmarkshavn America/Scoresbysund America/Thule","GM|Africa/Abidjan Africa/Banjul","GN|Africa/Abidjan Africa/Conakry","GP|America/Port_of_Spain America/Guadeloupe","GQ|Africa/Lagos Africa/Malabo","GR|Europe/Athens","GS|Atlantic/South_Georgia","GT|America/Guatemala","GU|Pacific/Guam","GW|Africa/Bissau","GY|America/Guyana","HK|Asia/Hong_Kong","HN|America/Tegucigalpa","HR|Europe/Belgrade Europe/Zagreb","HT|America/Port-au-Prince","HU|Europe/Budapest","ID|Asia/Jakarta Asia/Pontianak Asia/Makassar Asia/Jayapura","IE|Europe/Dublin","IL|Asia/Jerusalem","IM|Europe/London Europe/Isle_of_Man","IN|Asia/Kolkata","IO|Indian/Chagos","IQ|Asia/Baghdad","IR|Asia/Tehran","IS|Atlantic/Reykjavik","IT|Europe/Rome","JE|Europe/London Europe/Jersey","JM|America/Jamaica","JO|Asia/Amman","JP|Asia/Tokyo","KE|Africa/Nairobi","KG|Asia/Bishkek","KH|Asia/Bangkok Asia/Phnom_Penh","KI|Pacific/Tarawa Pacific/Enderbury Pacific/Kiritimati","KM|Africa/Nairobi Indian/Comoro","KN|America/Port_of_Spain America/St_Kitts","KP|Asia/Pyongyang","KR|Asia/Seoul","KW|Asia/Riyadh Asia/Kuwait","KY|America/Panama America/Cayman","KZ|Asia/Almaty Asia/Qyzylorda Asia/Qostanay Asia/Aqtobe Asia/Aqtau Asia/Atyrau Asia/Oral","LA|Asia/Bangkok Asia/Vientiane","LB|Asia/Beirut","LC|America/Port_of_Spain America/St_Lucia","LI|Europe/Zurich Europe/Vaduz","LK|Asia/Colombo","LR|Africa/Monrovia","LS|Africa/Johannesburg Africa/Maseru","LT|Europe/Vilnius","LU|Europe/Luxembourg","LV|Europe/Riga","LY|Africa/Tripoli","MA|Africa/Casablanca","MC|Europe/Monaco","MD|Europe/Chisinau","ME|Europe/Belgrade Europe/Podgorica","MF|America/Port_of_Spain America/Marigot","MG|Africa/Nairobi Indian/Antananarivo","MH|Pacific/Majuro Pacific/Kwajalein","MK|Europe/Belgrade Europe/Skopje","ML|Africa/Abidjan Africa/Bamako","MM|Asia/Yangon","MN|Asia/Ulaanbaatar Asia/Hovd Asia/Choibalsan","MO|Asia/Macau","MP|Pacific/Guam Pacific/Saipan","MQ|America/Martinique","MR|Africa/Abidjan Africa/Nouakchott","MS|America/Port_of_Spain America/Montserrat","MT|Europe/Malta","MU|Indian/Mauritius","MV|Indian/Maldives","MW|Africa/Maputo Africa/Blantyre","MX|America/Mexico_City America/Cancun America/Merida America/Monterrey America/Matamoros America/Mazatlan America/Chihuahua America/Ojinaga America/Hermosillo America/Tijuana America/Bahia_Banderas","MY|Asia/Kuala_Lumpur Asia/Kuching","MZ|Africa/Maputo","NA|Africa/Windhoek","NC|Pacific/Noumea","NE|Africa/Lagos Africa/Niamey","NF|Pacific/Norfolk","NG|Africa/Lagos","NI|America/Managua","NL|Europe/Amsterdam","NO|Europe/Oslo","NP|Asia/Kathmandu","NR|Pacific/Nauru","NU|Pacific/Niue","NZ|Pacific/Auckland Pacific/Chatham","OM|Asia/Dubai Asia/Muscat","PA|America/Panama","PE|America/Lima","PF|Pacific/Tahiti Pacific/Marquesas Pacific/Gambier","PG|Pacific/Port_Moresby Pacific/Bougainville","PH|Asia/Manila","PK|Asia/Karachi","PL|Europe/Warsaw","PM|America/Miquelon","PN|Pacific/Pitcairn","PR|America/Puerto_Rico","PS|Asia/Gaza Asia/Hebron","PT|Europe/Lisbon Atlantic/Madeira Atlantic/Azores","PW|Pacific/Palau","PY|America/Asuncion","QA|Asia/Qatar","RE|Indian/Reunion","RO|Europe/Bucharest","RS|Europe/Belgrade","RU|Europe/Kaliningrad Europe/Moscow Europe/Simferopol Europe/Kirov Europe/Astrakhan Europe/Volgograd Europe/Saratov Europe/Ulyanovsk Europe/Samara Asia/Yekaterinburg Asia/Omsk Asia/Novosibirsk Asia/Barnaul Asia/Tomsk Asia/Novokuznetsk Asia/Krasnoyarsk Asia/Irkutsk Asia/Chita Asia/Yakutsk Asia/Khandyga Asia/Vladivostok Asia/Ust-Nera Asia/Magadan Asia/Sakhalin Asia/Srednekolymsk Asia/Kamchatka Asia/Anadyr","RW|Africa/Maputo Africa/Kigali","SA|Asia/Riyadh","SB|Pacific/Guadalcanal","SC|Indian/Mahe","SD|Africa/Khartoum","SE|Europe/Stockholm","SG|Asia/Singapore","SH|Africa/Abidjan Atlantic/St_Helena","SI|Europe/Belgrade Europe/Ljubljana","SJ|Europe/Oslo Arctic/Longyearbyen","SK|Europe/Prague Europe/Bratislava","SL|Africa/Abidjan Africa/Freetown","SM|Europe/Rome Europe/San_Marino","SN|Africa/Abidjan Africa/Dakar","SO|Africa/Nairobi Africa/Mogadishu","SR|America/Paramaribo","SS|Africa/Juba","ST|Africa/Sao_Tome","SV|America/El_Salvador","SX|America/Curacao America/Lower_Princes","SY|Asia/Damascus","SZ|Africa/Johannesburg Africa/Mbabane","TC|America/Grand_Turk","TD|Africa/Ndjamena","TF|Indian/Reunion Indian/Kerguelen","TG|Africa/Abidjan Africa/Lome","TH|Asia/Bangkok","TJ|Asia/Dushanbe","TK|Pacific/Fakaofo","TL|Asia/Dili","TM|Asia/Ashgabat","TN|Africa/Tunis","TO|Pacific/Tongatapu","TR|Europe/Istanbul","TT|America/Port_of_Spain","TV|Pacific/Funafuti","TW|Asia/Taipei","TZ|Africa/Nairobi Africa/Dar_es_Salaam","UA|Europe/Simferopol Europe/Kiev Europe/Uzhgorod Europe/Zaporozhye","UG|Africa/Nairobi Africa/Kampala","UM|Pacific/Pago_Pago Pacific/Wake Pacific/Honolulu Pacific/Midway","US|America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu","UY|America/Montevideo","UZ|Asia/Samarkand Asia/Tashkent","VA|Europe/Rome Europe/Vatican","VC|America/Port_of_Spain America/St_Vincent","VE|America/Caracas","VG|America/Port_of_Spain America/Tortola","VI|America/Port_of_Spain America/St_Thomas","VN|Asia/Bangkok Asia/Ho_Chi_Minh","VU|Pacific/Efate","WF|Pacific/Wallis","WS|Pacific/Apia","YE|Asia/Riyadh Asia/Aden","YT|Africa/Nairobi Indian/Mayotte","ZA|Africa/Johannesburg","ZM|Africa/Maputo Africa/Lusaka","ZW|Africa/Maputo Africa/Harare"]}),c}); diff --git a/1337X_-_convert_torrent_timestamps_to_relative_format/moment.min.js b/1337X_-_convert_torrent_timestamps_to_relative_format/moment.min.js new file mode 100644 index 0000000..57cd2d4 --- /dev/null +++ b/1337X_-_convert_torrent_timestamps_to_relative_format/moment.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s>>0,s=0;sFe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return nt}function ut(t){var e;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11xe(n[pe],n[ve])?ke:n[Me]<0||24je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;cn.valueOf():n.valueOf()"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0 i.flaticon-magnet { + font-size: 13px; + color: #da3a04 + } + + .list-button-dl > i.flaticon-torrent-download { + font-size: 13px; + color: #89ad19; + } + + table.table-list td.dl-buttons { + border-left: 1px solid #f6f6f6; + border-right: 1px solid #c0c0c0; + padding-left: 2.5px; + padding-right: 2.5px; + text-align: center !important; + position: relative; + display: table-cell !important; /* proper height of cell on multiple row torrent name */ + width: 6%; + } + + td.dl-buttons > a, + td.dl-buttons > a:hover, + td.dl-buttons > a:visited, + td.dl-buttons > a:link, + td.dl-buttons > a:active { + color: inherit; + text-decoration: none; + cursor: pointer; + display: inline-block !important; + /* margin: 0 1.5px; */ + margin: 0 2px; + } + + table.table-list td.coll-1b { + border-right: 1px solid silver; + } + + .table-list > thead > tr > th:nth-child(2), + .table-list > thead > tr > td:nth-child(2) { + text-align: center; + } + +`); + + +function appendColumn() { + + const allTables = document.querySelectorAll('.table-list-wrap'); // for pages with multiple tables e.g. https://1337x.to/home/ + const isSeries = window.location.href.includes('/series/'); // for pages with tables that have no header e.g. https://1337x.to/series/a-to-z/1/13/ + const title = 'ml dl'; + + + allTables.forEach((table) => { + + const headersCellsInitial = table.querySelectorAll(`.table-list > thead > tr:not(.blank) > th:nth-child(1), + .table-list > tbody > tr:not(.blank) > td:nth-child(1)`); + headersCellsInitial.forEach((cell, index) => { + if (index === 0 && !isSeries) { + cell.insertAdjacentHTML('afterend', `` + title + ``); + } else { + cell.insertAdjacentHTML('afterend', `` + title + ``); + } + }); + + const headersCellsNew = table.querySelectorAll(`.table-list > thead > tr:not(.blank) > th:nth-child(2), + .table-list > tbody > tr:not(.blank) > td:nth-child(2)`); + headersCellsNew.forEach((cell, index) => { + cell.classList.add('coll-1b'); + if (index === 0 && !isSeries) { + cell.innerHTML = title; + } else { + cell.classList.add('dl-buttons'); + + let href; + if (!isSeries){ + href = headersCellsInitial[index].firstElementChild.nextElementSibling.href; + } else { + href = headersCellsInitial[index].firstElementChild.href; + } + + cell.innerHTML = ``; + cell.innerHTML += ``; + } + }); + + + }); + + +} + + + +function addClickListeners(links, type){ + + links.forEach((link) => { + + link.addEventListener('click', function(){ + + let href = this.getAttribute('href'); + if (href === 'javascript:void(0)') { + let tLink = this.getAttribute('data-href'); + + var xhr = new XMLHttpRequest(); + xhr.open('GET', tLink, true); // XMLHttpRequest.open(method, url, async) + xhr.onload = function () { + + let container = document.implementation.createHTMLDocument().documentElement; + container.innerHTML = xhr.responseText; + + let retrievedLink = (type === 'ml') ? container.querySelector('a[href^="magnet:"]') : container.querySelector('.dropdown-menu > li > a'); + + if (retrievedLink) { + link.setAttribute('href', retrievedLink.href.replace('http:', 'https:')); // the links are http and as such are blocked in Chrome + link.click(); + } + + + }; + xhr.send(); + + } + + }, false); + + }); + +} + + + +function createColumn(){ + appendColumn(); + addClickListeners(document.querySelectorAll('.list-button-magnet'), 'ml' ); + addClickListeners(document.querySelectorAll('.list-button-dl'), 'dl' ); +} + + +createColumn(); diff --git a/1337x_-_torrent_and_magnet_links/README.md b/1337x_-_torrent_and_magnet_links/README.md new file mode 100644 index 0000000..899c5f6 --- /dev/null +++ b/1337x_-_torrent_and_magnet_links/README.md @@ -0,0 +1,17 @@ +Adds a column with torrent and magnet links in 1337x lists: +![](https://i.imgur.com/goYAFQH.jpg) + +Notes: + +- The script generates all links via XHR: + - The DL/ML links will have: + - as tooltip: "`ml/dl via xhr`". + - as destination (href): + - initially: `javascript:void(0)` *(to avoid taking the user back to the top of the page, which occurred if having `#`, instead)*, + - as you click a ml/dl icon, the relevant target URL will be retrieved via XHR in the background. +- Thanks to: + - NotNeo: most of the CSS is from his [1337X - Magnet/Torrent links everywhere](https://greasyfork.org/en/scripts/373230-1337x-magnet-torrent-links-everywhere) script, + - barn852 for [this](https://greasyfork.org/en/scripts/420754-1337x-torrent-and-magnet-links/discussions/96026) contribution . +- Tampermonkey and Violentmonkey are supported - Greasemonkey is NOT supported. + +[Hosted at GitHub](https://github.com/darkred/Userscripts) diff --git a/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area.user.js b/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area.user.js new file mode 100644 index 0000000..d28f711 --- /dev/null +++ b/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area.user.js @@ -0,0 +1,255 @@ +// ==UserScript== +// @name Blabbermouth - generate timestamps and add link to the fb comments area +// @namespace darkred +// @version 2.0 +// @date 2022.5.14 +// @description Generates missing timestamps or converts the existing ones in relative format, and adds link to the fb comments area +// @author darkred +// @license MIT +// @include /^(https?:)?\/\/(www\.)?blabbermouth\.net\/(news|reviews)?/ +// @exclude /^(https?:)?\/\/(www\.)?blabbermouth\.net\/reviews(\/page|$)/ +// @include https://www.facebook.com/plugins/feedback.php* +// @grant none +// @require https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js +// @supportURL https://github.com/darkred/Userscripts/issues +// @icon https://drnizx3otcofi.cloudfront.net/b64e6010-2ac1-4e95-b545-1a2994bbbd04/img/favicon/favicon-32x32.png +// ==/UserScript== + + +/* global moment */ +/* eslint-disable no-console */ + +'use strict'; + + +// Customize the strings in the locale to display "1 minute ago" instead of "a minute ago" (https://github.com/moment/moment/issues/3764#issuecomment-279928245) +moment.updateLocale('en', { + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'seconds', + m: '1 minute', + mm: '%d minutes', + h: '1 hour', + hh: '%d hours', + d: '1 day', + dd: '%d days', + M: '1 month', + MM: '%d months', + y: '1 year', + yy: '%d years' + } +}); + +function convertToLocalTimezone(timestamp) { + // (the timestamp is in ISO 8601 format and its trailing Z means that it's in UTC ) + // 2020-03-05T15:40:38.000Z old + // 2022-05-11T12:16:05+00:00 new + let initialTimestamp = timestamp; + if (moment(initialTimestamp, moment.ISO_8601, true).isValid()) { + // let convertedToLocalTimezone = moment(initialTimestamp.replace('Z','') + '-05:00', 'YYYY-MM-DDTHH:mm:ssZ'); // the server's timezone is GMT-5 + let convertedToLocalTimezone = moment(initialTimestamp + '-03:47', 'YYYY-MM-DDTHH:mm:ss+Z'); // the server's timezone is GMT-4 plus 13 min, in order to sync with the relevant post timestamps in both Facebook and Twitter(TW is 1 min later than FB) blabbbermouth pages + publishedTimeLTZ = convertedToLocalTimezone.fromNow(); + let format = 'YYYY-MM-DD HH:mm:ss'; + publishedTimeLTZtitle = convertedToLocalTimezone.format(format); + } +} + +function recalc(existingTimestampElement, format, notitle) { + setInterval(function() { + if (existingTimestampElement && moment(existingTimestampElement.title, format, true).isValid()) { + existingTimestampElement.textContent = moment(existingTimestampElement.title).fromNow(); + } else if (notitle === true) { + existingTimestampElement.innerText = moment(existingTimestampElement.innerText.trim()).fromNow(); + } + }, 1 * 60 * 1000); // repeat every 1 minute +} + + +function onClick(){ + document.querySelector('iframe[title="fb:comments Facebook Social Plugin"]').scrollIntoView(); +} + + +// 1. IF ON NEWS PAGES LISTINGS (convertTolocal + apply to pagination) +if ( + window.location.href.endsWith('blabbermouth.net/') || + window.location.href.endsWith('blabbermouth.net/news') || + window.location.href.includes('blabbermouth.net/news/page/') +) { + + let options = { + root: null, + rootMargin: '0px', + threshold: 0 + }; + + let callback = (entries) => { + entries.forEach(entry => { + + if (!entry.target.classList.contains('done')){ + + + if (entry.isIntersecting && !entry.target.classList.contains('in-viewport') ) { + entry.target.classList.add('in-viewport'); + + const xhr = new XMLHttpRequest(); + const url = entry.target.parentElement.parentElement.firstElementChild.firstElementChild.href; + xhr.open('GET', url, true); // XMLHttpRequest.open(method, url, async) + xhr.onload = function () { + + let container = document.implementation.createHTMLDocument().documentElement; + container.innerHTML = xhr.responseText; + + let publishedTimestamp = container.querySelector('meta[property="article:published_time"]').content; + + convertToLocalTimezone(publishedTimestamp); + + entry.target.textContent = publishedTimeLTZ; + entry.target.title = publishedTimeLTZtitle; + + entry.target.classList.add('done'); + + recalc(entry.target, 'YYYY-MM-DD HH:mm:ss'); + }; + xhr.send(); + } + } + }); + }; + + let observer = new IntersectionObserver(callback, options); + + let allTimestamps = document.querySelectorAll('.news-single span.date'); + allTimestamps.forEach((element) => { + observer.observe(element); + }); + + + // ---------------------------------------- + // Watch for pagination events (when new '.article' children are added inside the '.infinite_scroll' element) + const targetNode2 = document.querySelector('.infinite-scroll-component'); + const config2 = { attributes: false, childList: true, subtree: false }; + + const callback2 = function(mutationsList) { + for(const mutation of mutationsList) { + if (mutation.type === 'childList') { + let allTimestamps = document.querySelectorAll('.news-single span.date'); + allTimestamps.forEach((element) => { + observer.observe(element); + }); + } + } + }; + + const observer2 = new MutationObserver(callback2); + observer2.observe(targetNode2, config2); + // ---------------------------------------- + + + // /blabbermouth\.net/\(reviews|news)/i.test(window.location.href) + +// 2+3. ELSE IF ON CD/DVD REVIEWS OR NEWS PAGES ((convertTolocal + generate timestamp) +} else if ( /blabbermouth\.net\/(reviews|news)/i.test(window.location.href) && + !window.location.href.includes('/page/') ) { + + //--- Double-check that this iframe is on the expected domain: + if (/blabbermouth\.net/i.test(location.host)) { + console.log('Userscript is in the MAIN page.'); + + // 2019-10-17T15:32:18.000Z + + + let publishedTimestamp; + if (document.querySelector('meta[property="article:published_time"]') !== null) { + publishedTimestamp = document.querySelector('meta[property="article:published_time"]').content; + } + console.log('publishedTimestamp: ' + publishedTimestamp); + + + + if (window.location.href.includes('blabbermouth.net/news/')) { + + var publishedTimeLTZ, publishedTimeLTZtitle; + + convertToLocalTimezone(publishedTimestamp); + + let existingTimestampElement = document.querySelector('div > h1+span.date'); + + existingTimestampElement.textContent = publishedTimeLTZ; + existingTimestampElement.title = publishedTimeLTZtitle; + + recalc(existingTimestampElement, 'YYYY-MM-DD HH:mm:ss'); + + } + + + + + + + + + if (!window.location.href.includes('blabbermouth.net/news/page/')){ + + convertToLocalTimezone(publishedTimestamp); + + var commentcount = '0'; + + var datePart = !window.location.href.includes('blabbermouth.net/news/') ? `${publishedTimeLTZ}` : ''; + + var HTML = ` +${datePart} + +`; + + const refSelector = '.reviews-single-article > div > .reviews-rate-comments,div > h1+span.date'; + + if (document.querySelector(refSelector) !== null) { + document.querySelector(refSelector).insertAdjacentHTML('afterend', HTML); + document.querySelector(refSelector).title = publishedTimeLTZtitle; + + document.getElementById('commentCount').addEventListener('click', onClick, false); + + let newDateTimeElement = document.querySelector('span.date'); + recalc(newDateTimeElement, 'YYYY-MM-DD HH:mm:ss'); + } + + } + + // Wait for messages [commentcount] (from iframe) + window.addEventListener('message', function addFbCounter(e) { + // something from an unknown domain, or doesn't contain the string "Comment" let's ignore it + console.log('Received message: ' + e.data); + if (e.origin !== 'https://www.facebook.com' || e.data.indexOf(' Comment') === -1) { + return; + } + console.log('Received message: ' + e.data); + // document.querySelector('#commentCount').innerText = e.data.replace(/ Comments?/i,''); + document.querySelector('#commentCount').innerText = e.data; + window.removeEventListener('message', addFbCounter); + }, + false + ); + console.log('Waiting for Message 1, from iframe...'); + } + + +// ELSE IF IT'S ON THE FACEBOOK COMMENTS IFRAME (send fb comment count to main page) +} + +if (window.location.href.includes('facebook.com')) { + + console.log('Userscript is in the FRAMED page.'); + + const selector = '._50f7'; + // Send commentcount to MAIN page + window.parent.postMessage( + document.querySelector(selector).innerText, + 'https://blabbermouth.net/reviews/' + ); +} diff --git a/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area/README.md b/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area/README.md new file mode 100644 index 0000000..5ddf36c --- /dev/null +++ b/Blabbermouth_-_generate_timestamps_and_add_link_to_the_FB_comments_area/README.md @@ -0,0 +1,36 @@ +This script applies to blabbermouth.net. + +Blabbermouth only displays timestamps (just the date) in news listings and pages. +**It doesn't display timestamps in cd/dvd reviews pages at all.** +The script generates timestamps in relative format, in all cases. + +In details: + +- in **news** and **cd/dvd reviews** pages: + + It generates timestamps *(making use of the existing `published_time` data from inside the pages, e.g. `2020-02-20T19:10:22.000Z`)* +in relative format. Also, it recalculates them every 1 minute. +_(the initial retrieved timestamps -converted to local timezone's offset- are tooltips: just hover mouse on a relative date to view)_ + + It also shows a link to the Facebook comments next to the generated timestamp, +with **the comment count from that fb iframe** 1 (i.e. `6 Comments`, not just "Comments" ). + + +- in **news** listings: + + As you scroll down each page, it retrieves the relevant target news page in the background in order to get the relevant `published_time` data from the page, and then generates timestamps (like before) in relative format. + + Since v1.2 now the script also works in paginated news pages. +  + +1 Compatibility note regarding that feature: + +- Violentmonkey: the script works in ok with VM in its default settings. +- Tampermonkey: in order to work with TM, you have to remove the `*://www.facebook.com/plugins/*` pattern from TM blacklist (it's blacklisted in TM settings by default). +- Greasemonkey: not supported. + +--- + +The script uses [moment.js](http://momentjs.com/). + +[Hosted in GitHub](https://github.com/darkred/Userscripts) diff --git a/BugMeNot/BugMeNot.user.js b/BugMeNot/BugMeNot.user.js index eb08ce3..56044fa 100644 --- a/BugMeNot/BugMeNot.user.js +++ b/BugMeNot/BugMeNot.user.js @@ -2,7 +2,7 @@ // @name BugMeNot // @namespace darkred // @version 2017.12.15 -// @description It integrates BugMeNot into any login form (it retrieves all matching logins from bugmenot.com and autofills the login form) +// @description Integrates BugMeNot into any login form (it retrieves all matching logins from bugmenot.com and autofills the login form) // @authors hosts, Matt McCarthy, darkred // @license MIT // @include http://* @@ -19,6 +19,7 @@ // @require https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js // @noframes // @run-at document-idle +// @supportURL https://github.com/darkred/Userscripts/issues // ==/UserScript== // // @grant GM.listValues diff --git a/Bugzilla_-_reveal_the_Depends,_Blocks,_See_Also_and_Duplicates_bug_titles/Bugzilla_-_reveal_the_Depends,_Blocks,_See_Also_and_Duplicates_bug_titles.user.js b/Bugzilla_-_reveal_the_Depends,_Blocks,_See_Also_and_Duplicates_bug_titles/Bugzilla_-_reveal_the_Depends,_Blocks,_See_Also_and_Duplicates_bug_titles.user.js index d7263a2..c5e082f 100644 --- a/Bugzilla_-_reveal_the_Depends,_Blocks,_See_Also_and_Duplicates_bug_titles/Bugzilla_-_reveal_the_Depends,_Blocks,_See_Also_and_Duplicates_bug_titles.user.js +++ b/Bugzilla_-_reveal_the_Depends,_Blocks,_See_Also_and_Duplicates_bug_titles/Bugzilla_-_reveal_the_Depends,_Blocks,_See_Also_and_Duplicates_bug_titles.user.js @@ -9,6 +9,7 @@ // @require https://code.jquery.com/jquery-3.2.1.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.2/jquery.scrollTo.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/keypress/2.1.3/keypress.min.js +// @supportURL https://github.com/darkred/Userscripts/issues // ==/UserScript== /* eslint-disable no-unused-vars */ diff --git a/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial.user.js b/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial.user.js index ce11a3d..8b4bfec 100644 --- a/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial.user.js +++ b/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial.user.js @@ -1,15 +1,16 @@ // ==UserScript== // @name Firefox for desktop - list fixed bugs in Mercurial // @namespace darkred -// @version 4.2.8 -// @description It generates a list of fixed bugs related to Firefox for desktop in Mozilla Mercurial pushlogs -// @authors darkred, johnp +// @version 4.2.9 +// @date 2020.8.25 +// @description Lists fixed bugs related to Firefox for desktop in Mozilla Mercurial pushlogs +// @author darkred, johnp // @license MIT -// @date 2018.5.13 // @include /^https?:\/\/hg\.mozilla\.org.*pushloghtml.*/ // @grant GM_getResourceURL // @grant GM_getResourceText // @grant GM_addStyle +// @grant GM_xmlhttpRequest // @grant GM_setClipboard // @require https://code.jquery.com/jquery-2.1.4.min.js // @require https://code.jquery.com/ui/1.11.4/jquery-ui.min.js @@ -22,6 +23,7 @@ // @resource IconSet6 https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/redmond/images/ui-icons_469bdd_256x240.png // @resource IconSet7 https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/redmond/images/ui-icons_6da8d5_256x240.png // Thanks a lot to: johnp (your contribution is most appreciated!), wOxxOm and Brock Adams. +// @supportURL https://github.com/darkred/Userscripts/issues // ==/UserScript== @@ -30,7 +32,7 @@ -/* eslint-disable no-console, indent, no-mixed-spaces-and-tabs, complexity */ +/* eslint-disable no-console, complexity */ var silent = false; @@ -125,112 +127,120 @@ String.prototype.escapeHTML = function() { time('MozillaMercurial-REST'); -$.getJSON(rest_url, function(data) { - timeEnd('MozillaMercurial-REST'); - data.bugs.sort(function(a, b) { - return (a.product + ': ' + a.component + ': ' + a.summary).localeCompare(b.product + ': ' + b.component + ': ' + b.summary); // had to change '>' with '.localeCompare' because the sorting wasn't applied when run with Tampermonkey - }); - $.each(data.bugs, function(index) { - let bug = data.bugs[index]; - // process bug (let "shorthands" just to simplify things during refactoring) - let status = bug.status; - if (bug.resolution !== '') {status += ' ' + bug.resolution;} - let product = bug.product; - let component = bug.component; - let platform = bug.platform; - if (platform === 'Unspecified') { - platform = 'Uns'; - } - if (bug.op_sys !== '' && bug.op_sys !== 'Unspecified') { - platform += '/' + bug.op_sys; - } - let whiteboard = bug.whiteboard === '' ? '[]' : bug.whiteboard; - // todo: message??? - - log('----------------------------------------------------------------------------------------------------------------------------------'); - log((index + 1) + '/' + numBugs); // Progression counter - log('BugNo: ' + bug.id + '\nTitle: ' + bug.summary + '\nStatus: ' + status + '\nProduct: ' + product + '\nComponent: ' + component + '\nPlatform: ' + platform + '\nWhiteboard: ' + whiteboard); - - if (isRelevant(bug)) { - // add html code for this bug - // console.log(typeof bug.summary) - bugsComplete.push('#' - + 'https://bugzilla.mozilla.org/show_bug.cgi?id='+ bug.id + '"' + ' title="' + bug.id + ' - ' + bug.summary + '">#' - + bug.id - + '' - + ' (' + product + ': ' + component + ') ' - + bug.summary.escapeHTML() + ' [' + platform + ']' + whiteboard.escapeHTML() + '
'); - } - counter++; // increase counter - // remove processed bug from bugIds - let i = bugIds.indexOf(bug.id); - if (i !== -1) {bugIds[i] = null;} - }); - log('==============\nReceived ' + counter + ' of ' + numBugs + ' bugs.'); - - // process remaining bugs one-by-one - time('MozillaMercurial-missing'); - $.each(bugIds, function(index) { - let id = bugIds[index]; - if (id !== null) { - time('Requesting missing bug ' + id); - let promise = $.getJSON('https://bugzilla.mozilla.org/rest/bug/' + id, - function(json) { - // I've not end up here yet, so cry if we do - console.error('Request for bug ' + id + ' succeeded unexpectedly!'); +GM_xmlhttpRequest({ + method: 'GET', + url: rest_url, + onload: function(response) { + + var data = JSON.parse(response.responseText); + + timeEnd('MozillaMercurial-REST'); + data.bugs.sort(function(a, b) { + return (a.product + ': ' + a.component + ': ' + a.summary).localeCompare(b.product + ': ' + b.component + ': ' + b.summary); // had to change '>' with '.localeCompare' because the sorting wasn't applied when run with Tampermonkey + }); + $.each(data.bugs, function(index) { + let bug = data.bugs[index]; + // process bug (let "shorthands" just to simplify things during refactoring) + let status = bug.status; + if (bug.resolution !== '') {status += ' ' + bug.resolution;} + let product = bug.product; + let component = bug.component; + let platform = bug.platform; + if (platform === 'Unspecified') { + platform = 'Uns'; + } + if (bug.op_sys !== '' && bug.op_sys !== 'Unspecified') { + platform += '/' + bug.op_sys; + } + let whiteboard = bug.whiteboard === '' ? '[]' : bug.whiteboard; + // todo: message??? + + log('----------------------------------------------------------------------------------------------------------------------------------'); + log((index + 1) + '/' + numBugs); // Progression counter + log('BugNo: ' + bug.id + '\nTitle: ' + bug.summary + '\nStatus: ' + status + '\nProduct: ' + product + '\nComponent: ' + component + '\nPlatform: ' + platform + '\nWhiteboard: ' + whiteboard); + + if (isRelevant(bug)) { + // add html code for this bug + // console.log(typeof bug.summary) + bugsComplete.push('#' + + 'https://bugzilla.mozilla.org/show_bug.cgi?id='+ bug.id + '"' + ' title="' + bug.id + ' - ' + bug.summary + '">#' + + bug.id + + '' + + ' (' + product + ': ' + component + ') ' + + bug.summary.escapeHTML() + ' [' + platform + ']' + whiteboard.escapeHTML() + '
'); + } + counter++; // increase counter + // remove processed bug from bugIds + let i = bugIds.indexOf(bug.id); + if (i !== -1) {bugIds[i] = null;} + }); + log('==============\nReceived ' + counter + ' of ' + numBugs + ' bugs.'); + + // process remaining bugs one-by-one + time('MozillaMercurial-missing'); + $.each(bugIds, function(index) { + let id = bugIds[index]; + if (id !== null) { + time('Requesting missing bug ' + id); + let promise = $.getJSON('https://bugzilla.mozilla.org/rest/bug/' + id, + function(json) { + // I've not end up here yet, so cry if we do + console.error('Request for bug ' + id + ' succeeded unexpectedly!'); + timeEnd('Requesting missing bug ' + id); + console.error(json); + }); + // Actually, we usually get an '401 Authorization Required' error + promise.fail(function(req, status, error) { timeEnd('Requesting missing bug ' + id); - console.error(json); - }); - // Actually, we usually get an '401 Authorization Required' error - promise.fail(function(req, status, error) { - timeEnd('Requesting missing bug ' + id); - if (error === 'Authorization Required') { - log('Bug ' + id + ' requires authorization!'); - log('https://bugzilla.mozilla.org/show_bug.cgi?id=' + id + ' requires authorization!'); - let text = ' requires authorization!
'; - - bugsComplete.push('#' - + id + '' + text); - } else { - console.error('Unexpected error encountered (Bug' + id + '): ' + status + ' ' + error); - } - }); - requests.push(promise); - } - }); - // wait for all requests to be settled, then join them together - // Source: https://stackoverflow.com/questions/19177087/deferred-how-to-detect-when-every-promise-has-been-executed - $.when.apply($, $.map(requests, function(p) { - return p.then(null, function() { - return $.Deferred().resolveWith(this, arguments); + if (error === 'Authorization Required') { + log('Bug ' + id + ' requires authorization!'); + log('https://bugzilla.mozilla.org/show_bug.cgi?id=' + id + ' requires authorization!'); + let text = ' requires authorization!
'; + + bugsComplete.push('#' + + id + '' + text); + } else { + console.error('Unexpected error encountered (Bug' + id + '): ' + status + ' ' + error); + } + }); + requests.push(promise); + } }); - })).always(function() { - timeEnd('MozillaMercurial-missing'); - // Variable that will contain all values of the bugsComplete array, and will be displayed in the 'dialog' below - var docu = ''; - docu = bugsComplete.join(''); - - var div = document.createElement('div'); - $('div.page_footer').append(div); - div.id = 'dialog'; - // GM_setClipboard (docu); // This line stores the list content HTML code to clipboard (aimed for MozillaZine daily "The Official Win32 xxxxxxx builds" maintainer) - // docu = '
' + docu + '
'; - docu = '
' + docu + '
'; - div.innerHTML = docu; - $('#dialog').hide(); - - $(function() { - $('#dialog').dialog({ - title: 'List of recently fixed bugs of Firefox for Desktop (' + bugsComplete.length + ')', - width: '1350px' + // wait for all requests to be settled, then join them together + // Source: https://stackoverflow.com/questions/19177087/deferred-how-to-detect-when-every-promise-has-been-executed + $.when.apply($, $.map(requests, function(p) { + return p.then(null, function() { + return $.Deferred().resolveWith(this, arguments); }); + })).always(function() { + timeEnd('MozillaMercurial-missing'); + // Variable that will contain all values of the bugsComplete array, and will be displayed in the 'dialog' below + var docu = ''; + docu = bugsComplete.join(''); + + var div = document.createElement('div'); + $('div.page_footer').append(div); + div.id = 'dialog'; + // GM_setClipboard (docu); // This line stores the list content HTML code to clipboard (aimed for MozillaZine daily "The Official Win32 xxxxxxx builds" maintainer) + // docu = '
' + docu + '
'; + docu = '
' + docu + '
'; + div.innerHTML = docu; + $('#dialog').hide(); + + $(function() { + $('#dialog').dialog({ + title: 'List of recently fixed bugs of Firefox for Desktop (' + bugsComplete.length + ')', + width: '1350px' + }); + }); + + log('ALL IS DONE'); + timeEnd('MozillaMercurial'); }); - log('ALL IS DONE'); - timeEnd('MozillaMercurial'); - }); + } }); function isRelevant(bug) { @@ -245,29 +255,29 @@ function isRelevant(bug) { return false; } - if ( bug.product && - bug.product !== 'Add-on SDK' && - bug.product !== 'Cloud Services' && - bug.product !== 'Core' && - bug.product !== 'Firefox' && - bug.product !== 'Hello (Loop)' && - bug.product !== 'Toolkit') { + if ( bug.product && + bug.product !== 'Add-on SDK' && + bug.product !== 'Cloud Services' && + bug.product !== 'Core' && + bug.product !== 'Firefox' && + bug.product !== 'Hello (Loop)' && + bug.product !== 'Toolkit') { log(' IRRELEVANT because of it\'s Product --> ' + bug.product); return false; } - if (bug.component && bug.component === 'AutoConfig' || - bug.component === 'Build Config' || - bug.component === 'DMD' || - bug.component === 'Embedding: GRE Core' || - bug.component === 'Embedding: Mac' || - bug.component === 'Embedding: MFC Embed' || - bug.component === 'Embedding: Packaging' || - bug.component === 'Hardware Abstraction Layer' || - bug.component === 'mach' || - bug.component === 'Nanojit' || - bug.component === 'QuickLaunch' || - bug.component === 'Widget: Gonk') { + if (bug.component && bug.component === 'AutoConfig'|| + bug.component === 'Build Config' || + bug.component === 'DMD' || + bug.component === 'Embedding: GRE Core' || + bug.component === 'Embedding: Mac' || + bug.component === 'Embedding: MFC Embed' || + bug.component === 'Embedding: Packaging' || + bug.component === 'Hardware Abstraction Layer' || + bug.component === 'mach' || + bug.component === 'Nanojit' || + bug.component === 'QuickLaunch' || + bug.component === 'Widget: Gonk') { log(' IRRELEVANT because of it\'s Component --> ' + bug.component); return false; diff --git a/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial_as_sortable_table/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial_as_sortable_table.user.js b/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial_as_sortable_table/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial_as_sortable_table.user.js index 1d23cc5..3c616ce 100644 --- a/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial_as_sortable_table/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial_as_sortable_table.user.js +++ b/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial_as_sortable_table/Firefox_for_desktop_-_list_fixed_bugs_in_Mercurial_as_sortable_table.user.js @@ -1,15 +1,16 @@ // ==UserScript== // @name Firefox for desktop - list fixed bugs in Mercurial as sortable table // @namespace darkred -// @version 5.5.9.1 -// @description It generates a sortable table list of fixed bugs related to Firefox for desktop in Mozilla Mercurial pushlogs -// @authors darkred, johnp +// @version 5.5.9.2 +// @date 2020.8.25 +// @description Lists (as sortable table) fixed bugs related to Firefox for desktop in Mozilla Mercurial pushlogs +// @author darkred, johnp // @license MIT -// @date 2018.5.16 // @include /^https?:\/\/hg\.mozilla\.org.*pushloghtml.*/ // @grant GM_getResourceURL // @grant GM_getResourceText // @grant GM_addStyle +// @grant GM_xmlhttpRequest // @require https://code.jquery.com/jquery-2.1.4.min.js // @require https://code.jquery.com/ui/1.11.4/jquery-ui.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.24.3/js/jquery.tablesorter.min.js @@ -27,10 +28,10 @@ // @resource IconSet6 https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/redmond/images/ui-icons_469bdd_256x240.png // @resource IconSet7 https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/redmond/images/ui-icons_6da8d5_256x240.png // Thanks a lot to: johnp (your contribution is most appreciated!), wOxxOm and Brock Adams. +// @supportURL https://github.com/darkred/Userscripts/issues // ==/UserScript== -/* esli nt-disable no-console, indent, no-mixed-spaces-and-tabs, complexity */ /* eslint-disable no-console, complexity */ /* global jstz, moment */ @@ -208,230 +209,237 @@ time('MozillaMercurial-REST'); -$.getJSON(rest_url, function(data) { - timeEnd('MozillaMercurial-REST'); - $.each(data.bugs, function(index) { - let bug = data.bugs[index]; - // process bug (let "shorthands" just to simplify things during refactoring) - let status = bug.status; - if (bug.resolution !== '') {status += ' ' + bug.resolution;} - let product = bug.product; - let component = bug.component; - let platform = bug.platform; - if (platform === 'Unspecified') { - platform = 'Uns'; - } - if (bug.op_sys !== '' && bug.op_sys !== 'Unspecified') { - platform += '/' + bug.op_sys; - } - let whiteboard = bug.whiteboard === '' ? '[]' : bug.whiteboard; - // todo: message??? - +GM_xmlhttpRequest({ + method: 'GET', + url: rest_url, + onload: function(response) { + var data = JSON.parse(response.responseText); + timeEnd('MozillaMercurial-REST'); + $.each(data.bugs, function(index) { + let bug = data.bugs[index]; + // process bug (let "shorthands" just to simplify things during refactoring) + let status = bug.status; + if (bug.resolution !== '') {status += ' ' + bug.resolution;} + let product = bug.product; + let component = bug.component; + let platform = bug.platform; + if (platform === 'Unspecified') { + platform = 'Uns'; + } + if (bug.op_sys !== '' && bug.op_sys !== 'Unspecified') { + platform += '/' + bug.op_sys; + } + let whiteboard = bug.whiteboard === '' ? '[]' : bug.whiteboard; + // todo: message??? - // 2015-11-09T14:40:41Z - function toRelativeTime(time, zone) { - var format2 = ('YYYY-MM-DD HH:mm:ss Z'); - return moment(time, format2).tz(zone).fromNow(); - } - - - function getLocalTimezone(){ - var tz = jstz.determine(); // Determines the time zone of the browser client - return tz.name(); // Returns the name of the time zone eg "Europe/Berlin" - } + // 2015-11-09T14:40:41Z + function toRelativeTime(time, zone) { + var format2 = ('YYYY-MM-DD HH:mm:ss Z'); + return moment(time, format2).tz(zone).fromNow(); + } - var changetime; - var localTimezone = getLocalTimezone(); - if (bug.last_change_time !== '') { - var temp = toRelativeTime(bug.last_change_time, localTimezone); - if (temp.match(/(an?) .*/)) { - changetime = temp.replace(/an?/, 1); - } else { - changetime = temp; + function getLocalTimezone(){ + var tz = jstz.determine(); // Determines the time zone of the browser client + return tz.name(); // Returns the name of the time zone eg "Europe/Berlin" } - // changetime - } else { - changetime = ''; - } + var changetime; + var localTimezone = getLocalTimezone(); + + if (bug.last_change_time !== '') { + var temp = toRelativeTime(bug.last_change_time, localTimezone); + if (temp.match(/(an?) .*/)) { + changetime = temp.replace(/an?/, 1); + } else { + changetime = temp; + } + // changetime + } else { + changetime = ''; + } - log('----------------------------------------------------------------------------------------------------------------------------------'); - log((index + 1) + '/' + numBugs); // Progression counter - log('BugNo: ' + bug.id + '\nTitle: ' + bug.summary + '\nStatus: ' + status + '\nProduct: ' + product + '\nComponent: ' + component + '\nPlatform: ' + platform + '\nWhiteboard: ' + whiteboard); - if (isRelevant(bug)) { - // add html code for this bug - bugsComplete.push('' - + 'https://bugzilla.mozilla.org/show_bug.cgi?id='+ bug.id + '"' + ' title="' + bug.id + ' - ' + bug.summary + '">#' - + bug.id - + '' - + '(' + product + ': ' + component + ') ' - + ''+bug.summary.escapeHTML() + ' [' + platform + ']' + whiteboard.escapeHTML() + '' - + '' + changetime + ''); // previously had a
at the end; - } - counter++; // increase counter - // remove processed bug from bugIds - let i = bugIds.indexOf(bug.id); - if (i !== -1) {bugIds[i] = null;} - }); - log('==============\nReceived ' + counter + ' of ' + numBugs + ' bugs.'); + log('----------------------------------------------------------------------------------------------------------------------------------'); + log((index + 1) + '/' + numBugs); // Progression counter + log('BugNo: ' + bug.id + '\nTitle: ' + bug.summary + '\nStatus: ' + status + '\nProduct: ' + product + '\nComponent: ' + component + '\nPlatform: ' + platform + '\nWhiteboard: ' + whiteboard); - // process remaining bugs one-by-one - time('MozillaMercurial-missing'); - $.each(bugIds, function(index) { - let id = bugIds[index]; - if (id !== null) { - time('Requesting missing bug ' + id); - let promise = $.getJSON('https://bugzilla.mozilla.org/rest/bug/' + id, - function(json) { - // I've not end up here yet, so cry if we do - console.error('Request for bug ' + id + ' succeeded unexpectedly!'); + if (isRelevant(bug)) { + // add html code for this bug + bugsComplete.push('' + + 'https://bugzilla.mozilla.org/show_bug.cgi?id='+ bug.id + '"' + ' title="' + bug.id + ' - ' + bug.summary + '">#' + + bug.id + + '' + + '(' + product + ': ' + component + ') ' + + ''+bug.summary.escapeHTML() + ' [' + platform + ']' + whiteboard.escapeHTML() + '' + + '' + changetime + ''); // previously had a
at the end; + } + counter++; // increase counter + // remove processed bug from bugIds + let i = bugIds.indexOf(bug.id); + if (i !== -1) {bugIds[i] = null;} + }); + log('==============\nReceived ' + counter + ' of ' + numBugs + ' bugs.'); + + + + + // process remaining bugs one-by-one + time('MozillaMercurial-missing'); + $.each(bugIds, function(index) { + let id = bugIds[index]; + if (id !== null) { + time('Requesting missing bug ' + id); + let promise = $.getJSON('https://bugzilla.mozilla.org/rest/bug/' + id, + function(json) { + // I've not end up here yet, so cry if we do + console.error('Request for bug ' + id + ' succeeded unexpectedly!'); + timeEnd('Requesting missing bug ' + id); + console.error(json); + }); + // Actually, we usually get an '401 Authorization Required' error + promise.fail(function(req, status, error) { timeEnd('Requesting missing bug ' + id); - console.error(json); + if (error === 'Authorization Required') { + // log("Bug " + id + " requires authorization!"); + log('https://bugzilla.mozilla.org/show_bug.cgi?id=' + id + ' requires authorization!'); + let text = ' requires authorization!
'; + + bugsComplete.push('#' + + id + '' + text); + } else { + console.error('Unexpected error encountered (Bug' + id + '): ' + status + ' ' + error); + } }); - // Actually, we usually get an '401 Authorization Required' error - promise.fail(function(req, status, error) { - timeEnd('Requesting missing bug ' + id); - if (error === 'Authorization Required') { - // log("Bug " + id + " requires authorization!"); - log('https://bugzilla.mozilla.org/show_bug.cgi?id=' + id + ' requires authorization!'); - let text = ' requires authorization!
'; - - bugsComplete.push('#' - + id + '' + text); - } else { - console.error('Unexpected error encountered (Bug' + id + '): ' + status + ' ' + error); - } - }); - requests.push(promise); - } - }); - // wait for all requests to be settled, then join them together - // Source: https://stackoverflow.com/questions/19177087/deferred-how-to-detect-when-every-promise-has-been-executed - $.when.apply($, $.map(requests, function(p) { - return p.then(null, function() { - return $.Deferred().resolveWith(this, arguments); + requests.push(promise); + } }); - })).always(function() { - timeEnd('MozillaMercurial-missing'); - // Variable that will contain all values of the bugsComplete array, and will be displayed in the 'dialog' below - var docu = ''; - docu = bugsComplete.join(''); - docu = ' ' + - '' + - '' + - '' + // '' + - '' + - '' + // '' + - '' + - '' + docu + '
BugNoProduct/ComponentProduct/Component_________SummaryModified
Modified__
'; - - - - - var div = document.createElement('div'); - $('div.page_footer').append(div); - div.id = 'dialog'; - docu = '
' + docu + '
'; - div.innerHTML = docu; - $('#dialog').hide(); - - $(function() { - $('#dialog').dialog({ - title: 'List of fixed bugs of Firefox for desktop (' + bugsComplete.length + ')', - width: '1350px' + // wait for all requests to be settled, then join them together + // Source: https://stackoverflow.com/questions/19177087/deferred-how-to-detect-when-every-promise-has-been-executed + $.when.apply($, $.map(requests, function(p) { + return p.then(null, function() { + return $.Deferred().resolveWith(this, arguments); + }); + })).always(function() { + timeEnd('MozillaMercurial-missing'); + // Variable that will contain all values of the bugsComplete array, and will be displayed in the 'dialog' below + var docu = ''; + docu = bugsComplete.join(''); + docu = ' ' + + '' + + '' + + '' + // '' + + '' + + '' + // '' + + '' + + '' + docu + '
BugNoProduct/ComponentProduct/Component_________SummaryModified
Modified__
'; + + + + + var div = document.createElement('div'); + $('div.page_footer').append(div); + div.id = 'dialog'; + docu = '
' + docu + '
'; + div.innerHTML = docu; + $('#dialog').hide(); + + $(function() { + $('#dialog').dialog({ + title: 'List of fixed bugs of Firefox for desktop (' + bugsComplete.length + ')', + width: '1350px' + }); }); - }); - - // THE CUSTOM PARSER MUST BE PUT BEFORE '$('#tbl').tablesorter ( {'' or else it wont work !!!! - // add parser through the tablesorter addParser method (for the "Last modified" column) - $.tablesorter.addParser({ - // set a unique id - id: 'dates', - is: function(s) { - return false; // return false so this parser is not auto detected - }, - format: function(s) { - // format your data for normalization - if (s !== ''){ - var number1, number2; + // THE CUSTOM PARSER MUST BE PUT BEFORE '$('#tbl').tablesorter ( {'' or else it wont work !!!! + // add parser through the tablesorter addParser method (for the "Last modified" column) + $.tablesorter.addParser({ + // set a unique id + id: 'dates', + is: function(s) { + return false; // return false so this parser is not auto detected + }, + format: function(s) { // format your data for normalization - number1 = Number((/(.{1,2}) .*/).exec(s)[1]); + if (s !== ''){ + var number1, number2; + // format your data for normalization + number1 = Number((/(.{1,2}) .*/).exec(s)[1]); - if (s.match(/A few seconds ago/)) { number2 = 0;} - else if (s.match(/(.*)seconds?.*/)) { number2 = 1;} - else if (s.match(/(.*)minutes?.*/)) {number2 = 60;} - else if (s.match(/(.*)hours?.*/)) { number2 = 3600;} - else if (s.match(/(.*)days?.*/)) { number2 = 86400;} - else if (s.match(/(.*)months?.*/)) { number2 = 30 * 86400;} - else if (s.match(/(.*)years?.*/)) {number2 = 365 * 30 * 86400;} - return number1 * number2; - } - }, - // set type, either numeric or text - type: 'numeric' - }); + if (s.match(/A few seconds ago/)) { number2 = 0;} + else if (s.match(/(.*)seconds?.*/)) { number2 = 1;} + else if (s.match(/(.*)minutes?.*/)) {number2 = 60;} + else if (s.match(/(.*)hours?.*/)) { number2 = 3600;} + else if (s.match(/(.*)days?.*/)) { number2 = 86400;} + else if (s.match(/(.*)months?.*/)) { number2 = 30 * 86400;} + else if (s.match(/(.*)years?.*/)) {number2 = 365 * 30 * 86400;} + return number1 * number2; + } + }, + // set type, either numeric or text + type: 'numeric' + }); - // make table sortable - $('#tbl').tablesorter({ - cssAsc: 'up', - cssDesc: 'down', - sortList: [[3, 0],[1, 0],[2, 0]], // in order the table to be sorted by default by column 3 'Modified', then by column 1 'Product/Component' and then by column 2 'Summary' - headers: {3: {sorter: 'dates'}}, - initialized: function() { - var mytable = document.getElementById('tbl'); - for (let i = 2, j = mytable.rows.length + 1; i < j; i++) { - if (mytable.rows[i].cells[3].innerHTML !== mytable.rows[i - 1].cells[3].innerHTML) { - for (let k = 0; k < 4; k++) { - mytable.rows[i - 1].cells[k].style.borderBottom = '1px black dotted'; + + // make table sortable + $('#tbl').tablesorter({ + cssAsc: 'up', + cssDesc: 'down', + sortList: [[3, 0],[1, 0],[2, 0]], // in order the table to be sorted by default by column 3 'Modified', then by column 1 'Product/Component' and then by column 2 'Summary' + headers: {3: {sorter: 'dates'}}, + initialized: function() { + var mytable = document.getElementById('tbl'); + for (let i = 2, j = mytable.rows.length + 1; i < j; i++) { + if (mytable.rows[i].cells[3].innerHTML !== mytable.rows[i - 1].cells[3].innerHTML) { + for (let k = 0; k < 4; k++) { + mytable.rows[i - 1].cells[k].style.borderBottom = '1px black dotted'; + } } } } - } - }); + }); - log('ALL IS DONE'); - timeEnd('MozillaMercurial'); + log('ALL IS DONE'); + timeEnd('MozillaMercurial'); - }); + }); + } }); diff --git a/Firefox_for_desktop_-_list_modified_bugs_in_Mercurial_as_sortable_table/Firefox_for_desktop_-_list_modified_bugs_in_Mercurial_as_sortable_table.user.js b/Firefox_for_desktop_-_list_modified_bugs_in_Mercurial_as_sortable_table/Firefox_for_desktop_-_list_modified_bugs_in_Mercurial_as_sortable_table.user.js index 23b7006..f66838a 100644 --- a/Firefox_for_desktop_-_list_modified_bugs_in_Mercurial_as_sortable_table/Firefox_for_desktop_-_list_modified_bugs_in_Mercurial_as_sortable_table.user.js +++ b/Firefox_for_desktop_-_list_modified_bugs_in_Mercurial_as_sortable_table/Firefox_for_desktop_-_list_modified_bugs_in_Mercurial_as_sortable_table.user.js @@ -1,15 +1,16 @@ // ==UserScript== // @name Firefox for desktop - list modified bugs in Mercurial as sortable table // @namespace darkred -// @version 5.5.9.1 -// @description It generates a sortable table list of bugs related to Firefox for desktop for which patches have landed in Mozilla Mercurial pushlogs -// @authors darkred, johnp +// @version 5.5.9.2 +// @date 2020.8.25 +// @description Lists (as sortable table) bugs related to Firefox for desktop for which patches have landed in Mozilla Mercurial pushlogs +// @author darkred, johnp // @license MIT -// @date 2018.5.16 // @include /^https?:\/\/hg\.mozilla\.org.*pushloghtml.*/ // @grant GM_getResourceURL // @grant GM_getResourceText // @grant GM_addStyle +// @grant GM_xmlhttpRequest // @require https://code.jquery.com/jquery-2.1.4.min.js // @require https://code.jquery.com/ui/1.11.4/jquery-ui.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.24.3/js/jquery.tablesorter.min.js @@ -27,10 +28,11 @@ // @resource IconSet6 https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/redmond/images/ui-icons_469bdd_256x240.png // @resource IconSet7 https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/redmond/images/ui-icons_6da8d5_256x240.png // Thanks a lot to: johnp (your contribution is most appreciated!), wOxxOm and Brock Adams. +// @supportURL https://github.com/darkred/Userscripts/issues // ==/UserScript== -/* eslint-disable no-console, indent, no-mixed-spaces-and-tabs, complexity */ +/* eslint-disable no-console, complexity */ /* global jstz, moment */ @@ -181,233 +183,240 @@ time('MozillaMercurial-REST'); -$.getJSON(rest_url, function(data) { - timeEnd('MozillaMercurial-REST'); - $.each(data.bugs, function(index) { - let bug = data.bugs[index]; - // process bug (let "shorthands" just to simplify things during refactoring) - let status = bug.status; - if (bug.resolution !== '') {status += ' ' + bug.resolution;} - let product = bug.product; - let component = bug.component; - let platform = bug.platform; - if (platform === 'Unspecified') { - platform = 'Uns'; - } - if (bug.op_sys !== '' && bug.op_sys !== 'Unspecified') { - platform += '/' + bug.op_sys; - } - let whiteboard = bug.whiteboard === '' ? '[]' : bug.whiteboard; - // todo: message??? +GM_xmlhttpRequest({ + method: 'GET', + url: rest_url, + onload: function(response) { + var data = JSON.parse(response.responseText); + timeEnd('MozillaMercurial-REST'); + $.each(data.bugs, function(index) { + let bug = data.bugs[index]; + // process bug (let "shorthands" just to simplify things during refactoring) + let status = bug.status; + if (bug.resolution !== '') {status += ' ' + bug.resolution;} + let product = bug.product; + let component = bug.component; + let platform = bug.platform; + if (platform === 'Unspecified') { + platform = 'Uns'; + } + if (bug.op_sys !== '' && bug.op_sys !== 'Unspecified') { + platform += '/' + bug.op_sys; + } + let whiteboard = bug.whiteboard === '' ? '[]' : bug.whiteboard; + // todo: message??? - // 2015-11-09T14:40:41Z - function toRelativeTime(time, zone) { - var format2 = ('YYYY-MM-DD HH:mm:ss Z'); - return moment(time, format2).tz(zone).fromNow(); - } - function getLocalTimezone(){ - var tz = jstz.determine(); // Determines the time zone of the browser client - return tz.name(); // Returns the name of the time zone eg "Europe/Berlin" - } + // 2015-11-09T14:40:41Z + function toRelativeTime(time, zone) { + var format2 = ('YYYY-MM-DD HH:mm:ss Z'); + return moment(time, format2).tz(zone).fromNow(); + } + function getLocalTimezone(){ + var tz = jstz.determine(); // Determines the time zone of the browser client + return tz.name(); // Returns the name of the time zone eg "Europe/Berlin" + } - var changetime; - var localTimezone = getLocalTimezone(); - if (bug.last_change_time !== '') { - var temp = toRelativeTime(bug.last_change_time, localTimezone); - if (temp.match(/(an?) .*/)) { - changetime = temp.replace(/an?/, 1); - } else { - changetime = temp; - } - // changetime - } else { - changetime = ''; - } + var changetime; + var localTimezone = getLocalTimezone(); + if (bug.last_change_time !== '') { + var temp = toRelativeTime(bug.last_change_time, localTimezone); + if (temp.match(/(an?) .*/)) { + changetime = temp.replace(/an?/, 1); + } else { + changetime = temp; + } + // changetime + } else { + changetime = ''; + } - log('----------------------------------------------------------------------------------------------------------------------------------'); - log((index + 1) + '/' + numBugs); // Progression counter - log('BugNo: ' + bug.id + '\nTitle: ' + bug.summary + '\nStatus: ' + status + '\nProduct: ' + product + '\nComponent: ' + component + '\nPlatform: ' + platform + '\nWhiteboard: ' + whiteboard); - if (isRelevant(bug)) { - // add html code for this bug - bugsComplete.push('' - + 'https://bugzilla.mozilla.org/show_bug.cgi?id='+ bug.id + '"' + ' title="' + bug.id + ' - ' + bug.summary + '">#' - + bug.id - + '' - + '(' + product + ': ' + component + ') ' - + ''+bug.summary.escapeHTML() + ' [' + platform + ']' + whiteboard.escapeHTML() + '' - + '' + changetime + '' - + '' + status + ''); // previously had a
at the end; - } - counter++; // increase counter - // remove processed bug from bugIds - let i = bugIds.indexOf(bug.id); - if (i !== -1) {bugIds[i] = null;} - }); - log('==============\nReceived ' + counter + ' of ' + numBugs + ' bugs.'); + log('----------------------------------------------------------------------------------------------------------------------------------'); + log((index + 1) + '/' + numBugs); // Progression counter + log('BugNo: ' + bug.id + '\nTitle: ' + bug.summary + '\nStatus: ' + status + '\nProduct: ' + product + '\nComponent: ' + component + '\nPlatform: ' + platform + '\nWhiteboard: ' + whiteboard); + if (isRelevant(bug)) { + // add html code for this bug + bugsComplete.push('' + + 'https://bugzilla.mozilla.org/show_bug.cgi?id='+ bug.id + '"' + ' title="' + bug.id + ' - ' + bug.summary + '">#' + + bug.id + + '' + + '(' + product + ': ' + component + ') ' + + ''+bug.summary.escapeHTML() + ' [' + platform + ']' + whiteboard.escapeHTML() + '' + + '' + changetime + '' + + '' + status + ''); // previously had a
at the end; + } + counter++; // increase counter + // remove processed bug from bugIds + let i = bugIds.indexOf(bug.id); + if (i !== -1) {bugIds[i] = null;} + }); + log('==============\nReceived ' + counter + ' of ' + numBugs + ' bugs.'); + + + + + // process remaining bugs one-by-one + time('MozillaMercurial-missing'); + $.each(bugIds, function(index) { + let id = bugIds[index]; + if (id !== null) { + time('Requesting missing bug ' + id); + let promise = $.getJSON('https://bugzilla.mozilla.org/rest/bug/' + id, + function(json) { + // I've not end up here yet, so cry if we do + console.error('Request for bug ' + id + ' succeeded unexpectedly!'); + timeEnd('Requesting missing bug ' + id); + console.error(json); + }); + // Actually, we usually get an '401 Authorization Required' error + promise.fail(function(req, status, error) { + timeEnd('Requesting missing bug ' + id); + if (error === 'Authorization Required') { + // log("Bug " + id + " requires authorization!"); + log('https://bugzilla.mozilla.org/show_bug.cgi?id=' + id + ' requires authorization!'); + let text = ' requires authorization!
'; - // process remaining bugs one-by-one - time('MozillaMercurial-missing'); - $.each(bugIds, function(index) { - let id = bugIds[index]; - if (id !== null) { - time('Requesting missing bug ' + id); - let promise = $.getJSON('https://bugzilla.mozilla.org/rest/bug/' + id, - function(json) { - // I've not end up here yet, so cry if we do - console.error('Request for bug ' + id + ' succeeded unexpectedly!'); - timeEnd('Requesting missing bug ' + id); - console.error(json); + bugsComplete.push('#' + + id + '' + text); + } else { + console.error('Unexpected error encountered (Bug' + id + '): ' + status + ' ' + error); + } }); - // Actually, we usually get an '401 Authorization Required' error - promise.fail(function(req, status, error) { - timeEnd('Requesting missing bug ' + id); - if (error === 'Authorization Required') { - - // log("Bug " + id + " requires authorization!"); - log('https://bugzilla.mozilla.org/show_bug.cgi?id=' + id + ' requires authorization!'); - let text = ' requires authorization!
'; - - bugsComplete.push('#' - + id + '' + text); - } else { - console.error('Unexpected error encountered (Bug' + id + '): ' + status + ' ' + error); - } - }); - requests.push(promise); - } - }); - // wait for all requests to be settled, then join them together - // Source: https://stackoverflow.com/questions/19177087/deferred-how-to-detect-when-every-promise-has-been-executed - $.when.apply($, $.map(requests, function(p) { - return p.then(null, function() { - return $.Deferred().resolveWith(this, arguments); + requests.push(promise); + } }); - })).always(function() { - timeEnd('MozillaMercurial-missing'); - // Variable that will contain all values of the bugsComplete array, and will be displayed in the 'dialog' below - var docu = ''; - docu = bugsComplete.join(''); - docu = '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + docu + '
BugNoProduct/ComponentSummaryModified___Status____________
'; - - - - - var div = document.createElement('div'); - $('div.page_footer').append(div); - div.id = 'dialog'; - docu = '
' + docu + '
'; - div.innerHTML = docu; - $('#dialog').hide(); - - $(function() { - $('#dialog').dialog({ - title: 'List of modified bugs of Firefox for desktop (' + bugsComplete.length + ')', - width: '1350px' + // wait for all requests to be settled, then join them together + // Source: https://stackoverflow.com/questions/19177087/deferred-how-to-detect-when-every-promise-has-been-executed + $.when.apply($, $.map(requests, function(p) { + return p.then(null, function() { + return $.Deferred().resolveWith(this, arguments); + }); + })).always(function() { + timeEnd('MozillaMercurial-missing'); + // Variable that will contain all values of the bugsComplete array, and will be displayed in the 'dialog' below + var docu = ''; + docu = bugsComplete.join(''); + docu = '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + docu + '
BugNoProduct/ComponentSummaryModified___Status____________
'; + + + + + var div = document.createElement('div'); + $('div.page_footer').append(div); + div.id = 'dialog'; + docu = '
' + docu + '
'; + div.innerHTML = docu; + $('#dialog').hide(); + + $(function() { + $('#dialog').dialog({ + title: 'List of modified bugs of Firefox for desktop (' + bugsComplete.length + ')', + width: '1350px' + }); }); - }); - - // THE CUSTOM PARSER MUST BE PUT BEFORE '$('#tbl').tablesorter ( {'' or else it wont work !!!! - // add parser through the tablesorter addParser method (for the "Last modified" column) - $.tablesorter.addParser({ - // set a unique id - id: 'dates', - is: function(s) { - return false; // return false so this parser is not auto detected - }, - format: function(s) { - // format your data for normalization - if (s !== ''){ - var number1, number2; + // THE CUSTOM PARSER MUST BE PUT BEFORE '$('#tbl').tablesorter ( {'' or else it wont work !!!! + // add parser through the tablesorter addParser method (for the "Last modified" column) + $.tablesorter.addParser({ + // set a unique id + id: 'dates', + is: function(s) { + return false; // return false so this parser is not auto detected + }, + format: function(s) { // format your data for normalization - number1 = Number((/(.{1,2}) .*/).exec(s)[1]); + if (s !== ''){ + var number1, number2; + // format your data for normalization + number1 = Number((/(.{1,2}) .*/).exec(s)[1]); - if (s.match(/A few seconds ago/)) { number2 = 0;} - else if (s.match(/(.*)seconds?.*/)) { number2 = 1;} - else if (s.match(/(.*)minutes?.*/)) {number2 = 60;} - else if (s.match(/(.*)hours?.*/)) { number2 = 3600;} - else if (s.match(/(.*)days?.*/)) { number2 = 86400;} - else if (s.match(/(.*)months?.*/)) { number2 = 30 * 86400;} - else if (s.match(/(.*)years?.*/)) {number2 = 365 * 30 * 86400;} - return number1 * number2; - } - }, - // set type, either numeric or text - type: 'numeric' - }); + if (s.match(/A few seconds ago/)) { number2 = 0;} + else if (s.match(/(.*)seconds?.*/)) { number2 = 1;} + else if (s.match(/(.*)minutes?.*/)) {number2 = 60;} + else if (s.match(/(.*)hours?.*/)) { number2 = 3600;} + else if (s.match(/(.*)days?.*/)) { number2 = 86400;} + else if (s.match(/(.*)months?.*/)) { number2 = 30 * 86400;} + else if (s.match(/(.*)years?.*/)) {number2 = 365 * 30 * 86400;} + return number1 * number2; + } + }, + // set type, either numeric or text + type: 'numeric' + }); - // make table sortable - $('#tbl').tablesorter({ - cssAsc: 'up', - cssDesc: 'down', - sortList: [[3, 0],[1, 0],[2, 0]], // in order the table to be sorted by default by column 3 'Modified', then by column 1 'Product/Component' and then by column 2 'Summary' - headers: {3: {sorter: 'dates'}}, - initialized: function() { - var mytable = document.getElementById('tbl'); - for (var i = 2, j = mytable.rows.length + 1; i < j; i++) { - if (mytable.rows[i].cells[3].innerHTML !== mytable.rows[i - 1].cells[3].innerHTML) { - for (var k = 0; k < 5; k++) { - mytable.rows[i - 1].cells[k].style.borderBottom = '1px black dotted'; + + // make table sortable + $('#tbl').tablesorter({ + cssAsc: 'up', + cssDesc: 'down', + sortList: [[3, 0],[1, 0],[2, 0]], // in order the table to be sorted by default by column 3 'Modified', then by column 1 'Product/Component' and then by column 2 'Summary' + headers: {3: {sorter: 'dates'}}, + initialized: function() { + var mytable = document.getElementById('tbl'); + for (var i = 2, j = mytable.rows.length + 1; i < j; i++) { + if (mytable.rows[i].cells[3].innerHTML !== mytable.rows[i - 1].cells[3].innerHTML) { + for (var k = 0; k < 5; k++) { + mytable.rows[i - 1].cells[k].style.borderBottom = '1px black dotted'; + } } } } - } - }); + }); - log('ALL IS DONE'); - timeEnd('MozillaMercurial'); + log('ALL IS DONE'); + timeEnd('MozillaMercurial'); - }); + }); + } }); diff --git a/GitHub_Confirmations_before_submitting_issues_and_comments/GitHub_Confirmations_before_submitting_issues_and_comments.user.js b/GitHub_Confirmations_before_submitting_issues_and_comments/GitHub_Confirmations_before_submitting_issues_and_comments.user.js index ac7cb80..5d7d2fc 100644 --- a/GitHub_Confirmations_before_submitting_issues_and_comments/GitHub_Confirmations_before_submitting_issues_and_comments.user.js +++ b/GitHub_Confirmations_before_submitting_issues_and_comments/GitHub_Confirmations_before_submitting_issues_and_comments.user.js @@ -7,6 +7,7 @@ // @license MIT // @include https://github.com/* // @grant none +// @supportURL https://github.com/darkred/Userscripts/issues // ==/UserScript== diff --git a/GitHub_Confirmations_before_submitting_issues_and_comments/README.md b/GitHub_Confirmations_before_submitting_issues_and_comments/README.md index b7a07e9..3c78fa0 100644 --- a/GitHub_Confirmations_before_submitting_issues_and_comments/README.md +++ b/GitHub_Confirmations_before_submitting_issues_and_comments/README.md @@ -12,4 +12,5 @@ i.e. it applies in these 3 cases: - when attempting to submit a new comment (while having focus in the new comment textarea) via Ctrl+Enter
-Thanks to trespassersW for his help [here](https://greasyfork.org/en/forum/discussion/comment/25063/#Comment_25063). + +Thanks to trespassersW for his help [here](https://greasyfork.org/en/discussions/development/55889-script-for-creating-a-confirmation-popup-when-submitting-closing-an-issue-via-ctrl-enter-in-github#comment-145065). diff --git a/Google_youtube_search_link/Google_youtube_search_link.user.js b/Google_youtube_search_link/Google_youtube_search_link.user.js index 47c40e4..e998740 100644 --- a/Google_youtube_search_link/Google_youtube_search_link.user.js +++ b/Google_youtube_search_link/Google_youtube_search_link.user.js @@ -4,13 +4,21 @@ // @author wOxxOm, darkred // @license MIT // @description Adds a YouTube search link next to the Videos link (e.g. Web, Images, Videos, YouTube, News, Maps, Shopping, ...) -// @version 2019.11.1 +// @version 2022.5.27 // @include https://www.google.com/* // @include /https?:\/\/(www\.)?google\.(com|(?:com?\.)?\w\w)\/.*/ // @grant none // @run-at document-start +// @supportURL https://github.com/darkred/Userscripts/issues // ==/UserScript== +const escapeHTMLPolicy = (({ trustedTypes }, policy) => + trustedTypes + ? trustedTypes.createPolicy('myEscapePolicy', policy) + : policy)(window, { + createHTML: (str) => str, +}); + process(); new MutationObserver(process).observe(document, { childList: true, subtree: true }); @@ -19,15 +27,17 @@ function process(mutations) { if (youtube) return; - var menu = document.querySelector('#hdtb-msb'); // selector for the element that contains all the links (Web, Images, Videos, News, Maps, Shopping, ...) + // Selectors for the bar element that contains all the links (Web, Images, Videos, News, Maps, Shopping, ...) + // '.ndYZfc', is for when the 'Images' tab is selected. The other, '#hdtb', is for all other cases. + var menu = document.querySelector('#hdtb, .ndYZfc'); if (!menu) return; - var menuContainer = menu.querySelector('.hdtb-imb').parentNode; + var menuContainer = menu.querySelector('#hdtb-msb, .tAcEof').parentNode; // '.tAcEof' is for when the 'Images' tab is selected. The other, '#hdtb-msb', is for all other cases. if (!youtube) { var q = '', - queryElement = document.querySelector('input[name="q"]'); // selector for the Google search input textbox + queryElement = document.querySelector('input[name="q"]'); // The google search input textbox if (queryElement) { if (queryElement.value) q = encodeURIComponent(queryElement.value); @@ -64,13 +74,26 @@ function process(mutations) { `; - var text = '