Created
September 11, 2016 00:57
-
-
Save justdanpo/ce0c7b95ff6ecfe62957ac2ebdf36511 to your computer and use it in GitHub Desktop.
vk.com: force HTML5 audio in Vivaldi/Opera + Windows 7
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 HTML5 audio in Vivaldi/Opera + Windows 7 | |
// @namespace https://gist.github.com/justdanpo | |
// @version 0.1 | |
// @description vk.com: force HTML5 audio in Vivaldi/Opera + Windows 7 | |
// @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 6.1/, "Windows NT 6.2"); | |
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