Update js
This commit is contained in:
parent
22b1d25d1b
commit
2a014a7f91
4 changed files with 19 additions and 15 deletions
|
@ -24,6 +24,7 @@ ForkBB.common = (function (doc, win) {
|
|||
backs[i].addEventListener("click", function (event) {
|
||||
win.history.back();
|
||||
event.preventDefault();
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
@ -43,7 +44,7 @@ ForkBB.common = (function (doc, win) {
|
|||
}
|
||||
}
|
||||
|
||||
function initShowPAss()
|
||||
function initShowPass()
|
||||
{
|
||||
var inps = doc.querySelectorAll("input[type='password']");
|
||||
|
||||
|
@ -83,13 +84,14 @@ ForkBB.common = (function (doc, win) {
|
|||
return {
|
||||
init : function () {
|
||||
initGoBack();
|
||||
initAnchorHL();
|
||||
initShowPAss();
|
||||
initForm();
|
||||
|
||||
if (typeof DOMTokenList !== 'undefined') {
|
||||
initAnchorHL();
|
||||
initShowPass();
|
||||
}
|
||||
},
|
||||
};
|
||||
}(document, window));
|
||||
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", ForkBB.common.init, false);
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", ForkBB.common.init, false);
|
||||
|
|
|
@ -459,7 +459,9 @@ ForkBB.media = (function (doc, win, nav) {
|
|||
|
||||
return {
|
||||
init : function () {
|
||||
crawl();
|
||||
if (!!Element.prototype.closest) {
|
||||
crawl();
|
||||
}
|
||||
},
|
||||
};
|
||||
}(document, window, navigator));
|
||||
|
|
|
@ -57,7 +57,10 @@ ForkBB.poll = (function (doc, win) {
|
|||
|
||||
return {
|
||||
init : function () {
|
||||
if (0 !== inputPE) {
|
||||
if (
|
||||
0 !== inputPE
|
||||
|| typeof DOMTokenList === 'undefined'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -188,6 +191,4 @@ ForkBB.poll = (function (doc, win) {
|
|||
};
|
||||
}(document, window));
|
||||
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", ForkBB.poll.init, false);
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", ForkBB.poll.init, false);
|
||||
|
|
|
@ -40,7 +40,8 @@ ForkBB.editor = (function (doc, win) {
|
|||
var conf, smiliesEnabled, linkEnabled;
|
||||
|
||||
if (
|
||||
!sceditor
|
||||
!Object.assign
|
||||
|| !sceditor
|
||||
|| !(textarea = doc.querySelector(selector))
|
||||
|| !(conf = JSON.parse(textarea.getAttribute(dataName)))
|
||||
) {
|
||||
|
@ -109,6 +110,4 @@ ForkBB.editor = (function (doc, win) {
|
|||
};
|
||||
}(document, window));
|
||||
|
||||
if (document.addEventListener && Object.assign) {
|
||||
document.addEventListener("DOMContentLoaded", ForkBB.editor.init, false);
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", ForkBB.editor.init, false);
|
||||
|
|
Loading…
Reference in a new issue