Last active
November 13, 2016 09:03
-
-
Save SoftCreatR/5691b370ed7b5a45b751 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 Shopstopper | |
// @namespace https://www.softcreatr.de | |
// @version 0.2 | |
// @description Reminds you, that you already bought this product (if you did...) | |
// @author Sascha "SoftCreatR" Greuel | |
// @match https://pluginstore.woltlab.com/file/* | |
// @grant none | |
// ==/UserScript== | |
$('a.buttonPrimary[href*="purchase"]').click(function(e) { | |
if ($('a.buttonPrimary[href*="download"]').length) { | |
e.preventDefault(); | |
WCF.System.Confirmation.show('Sie haben bereits eine Lizenz für dieses Produkt erworben. Möchten Sie eine weitere Lizenz erwerben?', $.proxy(function (action) { | |
if (action == 'confirm') window.location.href = $(this).attr('href'); | |
}, this)); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment