Skip to content

Instantly share code, notes, and snippets.

@mezzode
Last active November 8, 2015 07:32
Show Gist options
  • Save mezzode/2b5684f77d3ce8113f54 to your computer and use it in GitHub Desktop.
Save mezzode/2b5684f77d3ce8113f54 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Youtube Gaming Feedly
// @namespace numuon.me
// @description Change Youtube links in Feedly to Youtube Gaming links.
// @include https://feedly.com/*
// @version 1.1
// @grant none
// @require http://code.jquery.com/jquery-1.9.1.min.js
// ==/UserScript==
$(document).ready(function() {
window.setInterval(function() {
$('a').each(function(i, thisLink) {
thisLink.href = thisLink.href.replace('www.youtube.com/watch?','gaming.youtube.com/watch?');
});
}, 500);
});
// ==UserScript==
// @name Youtube Gaming Linker
// @namespace numuon.me
// @description Change all Youtube links to Youtube Gaming links.
// @exclude https://www.youtube.com/*
// @version 1.1
// @grant none
// ==/UserScript==
var links,thisLink;
links = document.evaluate("//a[@href]",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i=0;i<links.snapshotLength;i++) {
var thisLink = links.snapshotItem(i);
thisLink.href = thisLink.href.replace('www.youtube.com/watch?','gaming.youtube.com/watch?');
}
// ==UserScript==
// @name Youtube Gaming Redirect
// @namespace numuon.me
// @description Redirects Youtube to Youtube Gaming.
// @include https://www.youtube.com/watch?*
// @version 1.1
// @grant none
// ==/UserScript==
window.location.replace(window.location.href.replace("www.youtube.com/watch?","gaming.youtube.com/watch?"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment