הבדלים בין גרסאות בדף "מדיה ויקי:Common.js"
| שורה 3: | שורה 3: | ||
if(!$t.length) | if(!$t.length) | ||
return; | return; | ||
| − | $("h1").before('<div class="hamore-toolbox"><input type="checkbox" class="hamore-sources-cb" /> מקורות <input type="checkbox" class="hamore-terms-cb" /> מונחים <input type="checkbox" class="hamore-circles-cb" /> (הבהרות תרגום) <input type="checkbox" class="hamore-squares-cb" /> [השלמת ציטוטים] <input type="checkbox" class="hamore-indexes-cb" /> מספור פנימי <input type="checkbox" class="hamore-sourced-hebrews-cb" /> צביעת עברית במקור <input type="checkbox" class="hamore-hebrew-cb" /> תרגום עברי <input type="checkbox" class="hamore-arabic-cb" /> מקור ערבי</div>'); | + | $("h1").before('<div class="hamore-toolbox"><input type="checkbox" class="hamore-sources-cb" /> מקורות <input type="checkbox" class="hamore-terms-cb" /> מונחים <input type="checkbox" class="hamore-circles-cb" disabled="disabled" /> (הבהרות תרגום) <input type="checkbox" class="hamore-squares-cb" disabled="disabled" /> [השלמת ציטוטים] <input type="checkbox" class="hamore-indexes-cb" /> מספור פנימי <input type="checkbox" class="hamore-sourced-hebrews-cb" /> צביעת עברית במקור <input type="checkbox" class="hamore-hebrew-cb" /> תרגום עברי <input type="checkbox" class="hamore-arabic-cb" /> מקור ערבי</div>'); |
$(".hamore-toolbox input").click(); | $(".hamore-toolbox input").click(); | ||
| − | + | if (!localStorage) localStorage = {}; | |
| + | |||
$(".hamore-sources-cb").click(function() { | $(".hamore-sources-cb").click(function() { | ||
$t.toggleClass("hamore-hide-sources"); | $t.toggleClass("hamore-hide-sources"); | ||
| שורה 31: | שורה 32: | ||
$t.toggleClass("hamore-hide-arabic"); | $t.toggleClass("hamore-hide-arabic"); | ||
}); | }); | ||
| + | |||
| + | if(localStorage['hamore-sources-cb'] === "0") | ||
| + | $(".hamore-sources-cb").click(); | ||
| + | if(localStorage['hamore-terms-cb'] === "0") | ||
| + | $(".hamore-terms-cb").click(); | ||
| + | if(localStorage['hamore-circles-cb'] === "0") | ||
| + | $(".hamore-circles-cb").click(); | ||
| + | if(localStorage['hamore-squares-cb'] === "0") | ||
| + | $(".hamore-squares-cb").click(); | ||
| + | if(localStorage['hamore-indexes-cb'] === "0") | ||
| + | $(".hamore-indexes-cb").click(); | ||
| + | if(localStorage['hamore-sourced-hebrews-cb'] === "0") | ||
| + | $(".hamore-sourced-hebrews-cb").click(); | ||
| + | if(localStorage['hamore-hebrew-cb'] === "0") | ||
| + | $(".hamore-hebrew-cb").click(); | ||
| + | if(localStorage['hamore-arabic-cb'] === "0") | ||
| + | $(".hamore-arabic-cb").click(); | ||
}); | }); | ||
גרסה מ־10:55, 14 בספטמבר 2018
$(function() {
var $t = $("table.hamore");
if(!$t.length)
return;
$("h1").before('<div class="hamore-toolbox"><input type="checkbox" class="hamore-sources-cb" /> מקורות <input type="checkbox" class="hamore-terms-cb" /> מונחים <input type="checkbox" class="hamore-circles-cb" disabled="disabled" /> (הבהרות תרגום) <input type="checkbox" class="hamore-squares-cb" disabled="disabled" /> [השלמת ציטוטים] <input type="checkbox" class="hamore-indexes-cb" /> מספור פנימי <input type="checkbox" class="hamore-sourced-hebrews-cb" /> צביעת עברית במקור <input type="checkbox" class="hamore-hebrew-cb" /> תרגום עברי <input type="checkbox" class="hamore-arabic-cb" /> מקור ערבי</div>');
$(".hamore-toolbox input").click();
if (!localStorage) localStorage = {};
$(".hamore-sources-cb").click(function() {
$t.toggleClass("hamore-hide-sources");
});
$(".hamore-terms-cb").click(function() {
$t.toggleClass("hamore-hide-terms");
});
$(".hamore-circles-cb").click(function() {
$t.toggleClass("hamore-hide-circles");
});
$(".hamore-squares-cb").click(function() {
$t.toggleClass("hamore-hide-squares");
});
$(".hamore-indexes-cb").click(function() {
$t.toggleClass("hamore-hide-indexes");
});
$(".hamore-sourced-hebrews-cb").click(function() {
$t.toggleClass("hamore-hide-sourced-hebrews");
});
$(".hamore-hebrew-cb").click(function() {
$t.toggleClass("hamore-hide-hebrew");
});
$(".hamore-arabic-cb").click(function() {
$t.toggleClass("hamore-hide-arabic");
});
if(localStorage['hamore-sources-cb'] === "0")
$(".hamore-sources-cb").click();
if(localStorage['hamore-terms-cb'] === "0")
$(".hamore-terms-cb").click();
if(localStorage['hamore-circles-cb'] === "0")
$(".hamore-circles-cb").click();
if(localStorage['hamore-squares-cb'] === "0")
$(".hamore-squares-cb").click();
if(localStorage['hamore-indexes-cb'] === "0")
$(".hamore-indexes-cb").click();
if(localStorage['hamore-sourced-hebrews-cb'] === "0")
$(".hamore-sourced-hebrews-cb").click();
if(localStorage['hamore-hebrew-cb'] === "0")
$(".hamore-hebrew-cb").click();
if(localStorage['hamore-arabic-cb'] === "0")
$(".hamore-arabic-cb").click();
});