Skip to content

Instantly share code, notes, and snippets.

@justdanpo
Created September 11, 2016 00:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save justdanpo/ce0c7b95ff6ecfe62957ac2ebdf36511 to your computer and use it in GitHub Desktop.
vk.com: force HTML5 audio in Vivaldi/Opera + Windows 7
// ==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