Greasy Fork is available in English.

Youtube Offliberate Button

Places an "Offliberate" button next to the subscribe button under YouTube videos. The button redirects you to Offliberty.com, where the conversion is started automatically. Based on "Youtube MP3 Download Button" by Soulweaver.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name       Youtube Offliberate Button
// @namespace  http://abs.ezw.me
// @icon       http://offliberty.com/favicon.ico
// @version    1.2.2
// @description  Places an "Offliberate" button next to the subscribe button under YouTube videos. The button redirects you to Offliberty.com, where the conversion is started automatically. Based on "Youtube MP3 Download Button" by Soulweaver.
// @match      *://www.youtube.com/*
// @grant GM_addStyle
// ==/UserScript==

function insertOffliberateButton() {
	document.getElementsByClassName('action-panel-trigger-share')[0].insertAdjacentHTML('afterend', `<button id="offliberate-button" class="yt-uix-button yt-uix-button-size-default yt-uix-button-opacity yt-uix-button-has-icon no-icon-markup" title="Offliberate" target="_blank" onclick="window.open('${linkPath}');"><span class="yt-uix-button-content">Offliberate</span></button>`);
}

GM_addStyle('#offliberate-button:before {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsSAAALEgHS3X78AAABJElEQVQ4y61VUW0DMQx9rgogEMJgYXAHYRAOwiB0DA5CoRyElEHG4IbA+5hT+dw4TaVG8o9jPznv2Q4xM7xDRBHADCCKqwDYmLm4Scz8YAAWSWbHCoClmWuAAoCtA2RtAxCagAKWncQvsdZd1qAasFfZLOZWWnFOQv4CYFLU3gB8O7T/yN1N+SbBQK1OC7CLqsGpsEhOktj702vHRFP+RS6unSevEnMxubG2iHXGAQ6DVKl9n2fVtJWCQkSz4W1tcJmYeSOig++MsfMxGIeTCGLHrTzJ+wWQiSgZf+6Jsnb6riXcP/9O2yRHxV2BWUHyfVIaSmvQoFQOTg9yXRbPRm8FEFVMajzzMHqjy6Fn7eXw9vX14oLN3oKlgS8gidU+y70v4A/T/Y3jGZ6RBAAAAABJRU5ErkJggg==) no-repeat; width:20px; height:20px;}');

let linkPath ='http://offliberty.com/#'+encodeURIComponent(document.URL);
console.log('Offliberty link path: ', linkPath);

insertOffliberateButton();

let prevLoc = location.href.match(/^([^#&]*)/)[0];
setInterval(()=> {
	if (location.href.match(/^([^#&]*)/)[0] != prevLoc)
		setTimeout(insertOffliberateButton,2000);
	prevLoc = location.href.match(/^([^#&]*)/)[0];
}, 1000);