-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
23 lines (19 loc) · 893 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// ==UserScript==
// @name Tchibo Affiliate Marketing Group Selector Fix
// @namespace https://affiliate.tchibo.hu
// @version 0.1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
// @description Ha mar unod, hogy a form elfelejti az aktualis marketing csoportot
// @match https://affiliate.tchibo.hu/idevaffiliate/account.php*
// @copyright 2014 billsuxx http://github.com/billsuxx
// ==/UserScript==
(function() {
//csak ilyen randa selectorral tudtam megtalalni az eppen aktualisan kivalasztott bannert
var bannerIdContainer = jQuery('html').find('.tartalom b font')[2],
bannerId = $(bannerIdContainer).text();
if (bannerId) {
jQuery(".tartalom select").find("option").filter(function(index) {
return bannerId === $(this).text();
}).prop("selected", "selected");
}
})();