Created
July 23, 2015 12:19
-
-
Save leafnode/d0ab1c2a0ecf27962012 to your computer and use it in GitHub Desktop.
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 Allegro Watchlist reminders | |
// @namespace leafnode | |
// @description Add button to enable reminders on all auctions | |
// @include http://allegro.pl/myaccount/watch.php | |
// @version 1 | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js | |
// ==/UserScript== | |
window.addEventListener("load", function(e) { | |
window.tickButtons = function(email, gg) { | |
var email = typeof email !== 'undefined' ? email : false; | |
var gg = typeof gg !== 'undefined' ? gg : false; | |
if (email) | |
jQuery('.mailInvert:not(:checked)').attr('checked', true); | |
if (gg) | |
jQuery('.ggInvert:not(:checked)').attr('checked', true); | |
} | |
}); | |
jQuery("#listButtonsMain div").prepend( | |
'<img id="tickEmailNotification" style="height:14px" onclick="window.tickButtons(true, false);" title="Zaznacz email" alt="Zaznacz email" src="http://static.allegrostatic.pl/site_images/1/0/invert.gif">Zaznacz email<br />' + | |
'<img id="tickGGNotification" style="height:14px" onclick="window.tickButtons(false, true);" title="Zaznacz gg" alt="Zaznacz gg" src="http://static.allegrostatic.pl/site_images/1/0/invert.gif">Zaznacz GG<br />' + | |
'<img id="tickAllNotifications" style="height:14px" onclick="window.tickButtons(true, true);" title="Zaznacz wszystko" alt="Zaznacz wszystko" src="http://static.allegrostatic.pl/site_images/1/0/invert.gif">Zaznacz wszystko<br />' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment