Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Youtube redirect b gone
- // @namespace www.dwedit.org
- // @description Removes redirect URLs from Youtube
- // @include http://www.youtube.com/*
- // @version 1
- // @grant none
- // ==/UserScript==
- function fixLinks()
- {
- var documentLinks = document.getElementsByTagName("a");
- var lookFor = "redirect?q=";
- var lookFor2 = "&";
- for (var i = 0; i < documentLinks.length; i++)
- {
- var docLink = documentLinks[i];
- alert(doclink.class);
- if (docLink.class == "yt-uix-redirect-link")
- {
- docLink.class = "";
- alert (docLink.href);
- }
- }
- }
- fixLinks();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement