1// register toolbar button 2if (typeof window.toolbar !== 'undefined') { 3 toolbar[toolbar.length] = { 4 type: 'format', 5 title: LANG.plugins.encryptedpasswords.addpass, 6 icon: DOKU_BASE + 'lib/plugins/encryptedpasswords/encrypt.png', 7 open: '<encrypt>', 8 close: '</encrypt>', 9 sample: 'password', 10 }; 11 toolbar[toolbar.length] = { 12 type: 'encryptedPasswordsToggle', 13 title: LANG.plugins.encryptedpasswords.decryptAll, 14 icon: DOKU_BASE + 'lib/plugins/encryptedpasswords/password.png', 15 }; 16 17 // actual click handler is defined in the EditorHandling class later 18 function addBtnActionEncryptedPasswordsToggle($btn, props, edid) { 19 $btn.on('click', function () { 20 $btn.trigger('EncryptedPasswordsToggleEvent', [edid]); 21 }) 22 } 23} 24 25jQuery(function () { 26 /* DOKUWIKI:include script/GUI.js */ 27 /* DOKUWIKI:include script/md5.min.js */ 28 /* DOKUWIKI:include script/SubtleAES.js */ 29 /* DOKUWIKI:include script/PageHandling.js */ 30 /* DOKUWIKI:include script/EditorHandling.js */ 31 32 const aes = new SubtleAES(); 33 new PageHandling(aes); 34 new EditorHandling(aes); 35 36}); 37