Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Finals Standings Easy Copy
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @author Rippy
- // @match *://www.neopets.com/altador/colosseum/standings.phtml*
- // @grant none
- // @require http://code.jquery.com/jquery-latest.js
- // ==/UserScript==
- (function() {
- 'use strict';
- const currentPositions = [];
- const rrOrder = [
- "Meridell",
- "Krawk Island",
- "Brightvale",
- "Maraqua",
- "Virtupets",
- "Darigan Citadel",
- "Kreludor",
- "Mystery Island",
- "Moltara",
- "Roo Island",
- "Shenkuu",
- "Tyrannia",
- "Terror Mountain",
- "Faerieland",
- "Lost Desert",
- "Haunted Woods",
- "Altador",
- "Kiko Lake"
- ];
- $(".ac-bracket-name").each(function(i, obj) {
- currentPositions.push(obj.innerText);
- });
- const output = rrOrder.map((e) => (currentPositions.indexOf(e) + 1) % 6 || 6);
- function copyData() {
- if (!window.isSecureContext) {
- alert("You need to be on HTTPS://www.neopets.com to use this feature!");
- return;
- }
- navigator.clipboard.writeText(output.join("\n"));
- alert("Copied standings to clipboard!");
- }
- $(".ac-grid-title").click(copyData);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement