Created
September 11, 2016 00:59
-
-
Save justdanpo/bd3e94121199e545562f13e8968cd779 to your computer and use it in GitHub Desktop.
vk.com: force Flash audio in Vivaldi/Opera
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 vk.com: force Flash audio in Vivaldi/Opera | |
// @namespace https://gist.github.com/justdanpo | |
// @version 0.1 | |
// @description vk.com: force Flash audio in Vivaldi/Opera | |
// @author den_po | |
// @include https://vk.com/* | |
// @include https://*.vk.com/* | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
var vkua = navigator.userAgent.replace(/Windows NT \d+.\d+/, "Windows NT 6.1"); | |
document.documentElement.setAttribute('onreset', "navigator.__defineGetter__('userAgent', function(){ return '" + vkua.replace(/'/g, "\'") + "' });"); | |
document.documentElement.dispatchEvent(new CustomEvent('reset')); | |
document.documentElement.removeAttribute('onreset'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment