Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add RSS link to bitchute
// ==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
You can’t perform that action at this time.