Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Speedrun.com Run Link
- // @namespace com.dotsarecool.util
- // @version 1.2
- // @description Shows actual hyperlinks for runs on the leaderboard & awaiting verification
- // @author Dotsarecool
- // @match https://www.speedrun.com/*
- // @grant none
- // @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
- // ==/UserScript==
- (function() {
- var e = document.createElement("a");
- $(e).addClass("btn btn-default");
- $(e).html("Show Links");
- $(e).click(function() {
- $("#leaderboarddiv tr.linked, #leaderboarddiv1 tr.linked").each(function(a, b) {
- var h = $(this).attr("data-target").split("/");
- var view = "/" + h[1] + "/run/" + h[3];
- var edit = "/" + h[1] + "/editrun/" + h[3];
- $(this).append("<td class='nobr center hidden-xs'><a href='"+view+"'>Link</a></td><td class='nobr center hidden-xs'><a href='"+edit+"'>Edit</a></td>");
- });
- });
- domain = document.location.toString();
- if(domain.includes("runsawaitingverification")) {
- $(".panel:first-child .panel-heading:first-child").after(e);
- } else if (domain.includes("/user/")) {
- $(".pull-right").after(e);
- } else {
- $("#submitrun").after(e);
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement