Skip to content

Instantly share code, notes, and snippets.

@shinmai
Last active March 7, 2023 12:10
Show Gist options
  • Save shinmai/d522b1f201ea619a433ae02b0d1d6312 to your computer and use it in GitHub Desktop.
Save shinmai/d522b1f201ea619a433ae02b0d1d6312 to your computer and use it in GitHub Desktop.
Premiumize.me VLC protocol handler integration
// ==UserScript==
// @name Premiumize.me VLC protocol handler integration
// @namespace http://aapo.rip
// @version 0.0.1
// @description change the "Stream with VLC" button to use the vlc:// protocol
// @author shinmai
// @match https://*.premiumize.me/file?id=*
// @updateURL https://gist.github.com/shinmai/d522b1f201ea619a433ae02b0d1d6312/raw/premiumize.me_vlc.user.js
// @downloadURL https://gist.github.com/shinmai/d522b1f201ea619a433ae02b0d1d6312/raw/premiumize.me_vlc.user.js
// ==/UserScript==
/* CHANGELOG
0.1:
* Initial version
*/
(function() {
'use strict';
const btn = document.querySelector('.btn-primary[target="_blank"]')
btn.href = 'vlc://'+decodeURI(decodeURIComponent(btn.href.split('location=')[1]))
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment