Created
April 19, 2018 06:22
Star
You must be signed in to star a gist
Add RSS link to bitchute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Bitchute RSS | |
// @namespace CompletelyUnknown | |
// @description Adds RSS URL to bitchute. | |
// @include *://www.bitchute.com/channel/* | |
// @include *://www.bitchute.com/video/* | |
// @version 1 | |
// @grant none | |
// @run-at document-idle | |
// ==/UserScript== | |
;(function(){ | |
function add_rss() { | |
var channel_link = document.querySelector('.video-author a') || (/channel/.test(window.location) ? window.location : document.createElement('a')), | |
channel_id = channel_link.href.replace(/^.*\/([^\/]+)\//, "$1"), | |
channel_rss = 'https://www.bitchute.com/feeds/rss/channel/' + channel_id + '/', | |
rsslink = document.createElement('link'); | |
if(channel_id) { | |
rsslink.setAttribute('href', channel_rss); | |
rsslink.setAttribute('rel', 'alternate'); | |
rsslink.setAttribute('type', 'application/rss+xml'); | |
document.head.appendChild(rsslink); | |
} | |
} | |
window.setTimeout(add_rss, 3000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment