mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-21 20:35:31 +02:00
kss - content organization
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
(function (window, document) {
|
||||
'use strict';
|
||||
|
||||
var KssGuides = function (config) {
|
||||
this.bodyClass = config.bodyClass || 'kss-guides-mode';
|
||||
|
||||
this.init();
|
||||
};
|
||||
|
||||
KssGuides.prototype.init = function () {
|
||||
var self = this;
|
||||
// Initialize all guides toggle buttons.
|
||||
document.querySelectorAll('a[data-kss-guides]').forEach(function (el) {
|
||||
el.onclick = self.showGuides.bind(self);
|
||||
});
|
||||
};
|
||||
|
||||
// Toggle the guides mode.
|
||||
KssGuides.prototype.showGuides = function () {
|
||||
document.getElementsByTagName('body')[0].classList.toggle(this.bodyClass);
|
||||
};
|
||||
|
||||
// Export to DOM global space.
|
||||
window.KssGuides = KssGuides;
|
||||
|
||||
})(window, document);
|
Reference in New Issue
Block a user