I'm trying to have my Tampermonkey script show a Chrome notification, but no notification is showing up. I have allowed notifications on the site.
Here is my code:
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match somewebsite.com/*
// @grant GM_notification
// @require http://code.jquery.com/jquery-1.12.4.min.js
// ==/UserScript==
(function ($, undefined) {
$(function () {
GM_notification({title: 'foo', image: 'bar', text: '42', onclick: console.log});
});
})(window.jQuery.noConflict(true));
What do I need to change?
GM_notification ( {title: 'foo', text: '42', timeout: 1000} );
– Homochromous