Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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