I have this script:
// ==UserScript==
// @match https://gitter.im/*
// ==/UserScript==
(function(Notif) {
function play() {
var a = document.createElement('audio');
a.setAttribute('autoplay', true);
a.setAttribute('src', 'http://www.soundjay.com/button/beep-03.mp3');
}
window.Notification = function(title, option) {
var notif = new Notif(title, option);
play();
return notif;
};
for (var key in Notif) {
if (Notif.hasOwnProperty(key)) {
window.Notification[key] = Notif[key];
}
}
})(Notification);
How do I install it in chromium, I've tried to drag and drop to the new tab, creating url using data url that point to my localhost or upload it to gitter and click the link but I always get error that I'm not allowed to install scripts and extensions that came from that site.
You can go to settings -> extensions (chrome://extensions/) and drag the file into the window. Chromium will install extension from local file.
Starting in Chromium 21, it is more difficult to install extensions, apps, and user scripts from outside the Chrome Web Store. Previously, users could click on a link to a *.crx file, and Chromium would offer to install the file after a few warnings. After Chromium 21, such files must be downloaded and dragged onto the Chromium settings page. This setting allows specific URLs to have the old, easier installation flow.