-
Notifications
You must be signed in to change notification settings - Fork 2
/
edit mode only for sharingcart.html
43 lines (37 loc) · 1.9 KB
/
edit mode only for sharingcart.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!-- Edit Mode Only For SharingCart v.1.4 - Copyright (C) 2021, TRMSC - https://trmsc1.wordpress.com/ -->
<!-- GNU General Public Licence 3.0 - http://www.gnu.de/documents/gpl-3.0.en.html -->
<!-- THIS CODE ALLOW USERS ONLY TO PUT STUFF IN THEIR SHARINGCART WITHOUT HAVING OTHER EDITING-OPPORTUNITIES -->
<!-- CHANGE THE EDITOR TO UNFORMATED TEXT FOR PUTTING THE CODE INTO A TEXTBLOCK! -->
<strong>Dieser Kurs beinhaltet eine eingeschränkte Bearbeitung.</strong><br>
<u id="editNote">Bearbeiten einschalten, um Inhalte in den SharingCart zu kopieren.</u><hr>
<sub style="vertical-align: text-top;">Hinweis für Kursersteller*in: Diesen Block für eine reguläre Bearbeitung verbergen.</sub>
<style>
.region-main .action-menu, .region-main .editing_move, .region-main .section-handle, .region-main .quickediticon, .region-main .edit, .region-main .section-modchooser, .region-main .add-sections, .fa-clone, .block .fa-arrows, #dndupload-status {
display: none!important;
}
#editNote {
border-radius: 3px;
}
</style>
<script>
window.onload = function() {
jquery_load_check_interval = setInterval(function() {
if (window.jQuery) {
remindEditing();
console.log("jquery successfully loaded...");
console.log($.fn.jquery); // <== version of jQuery
clearInterval(jquery_load_check_interval);
} else {
console.log("new try to load jquery...");
}
}, 150);
function remindEditing() {
if ( $("#page-header .btn:contains('Bearbeiten einschalten')").length ) {
$("#editNote").css("background-color", "#fefe64");
$("#page-header .btn").css({color: "#edff5c", fontWeight: "600", textDecoration: "underline"});
} else {
$("#editNote").css("display", "none");
}
}
};
</script>