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) {
|
backs[i].addEventListener("click", function (event) {
|
||||||
win.history.back();
|
win.history.back();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -43,7 +44,7 @@ ForkBB.common = (function (doc, win) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initShowPAss()
|
function initShowPass()
|
||||||
{
|
{
|
||||||
var inps = doc.querySelectorAll("input[type='password']");
|
var inps = doc.querySelectorAll("input[type='password']");
|
||||||
|
|
||||||
|
@ -83,13 +84,14 @@ ForkBB.common = (function (doc, win) {
|
||||||
return {
|
return {
|
||||||
init : function () {
|
init : function () {
|
||||||
initGoBack();
|
initGoBack();
|
||||||
initAnchorHL();
|
|
||||||
initShowPAss();
|
|
||||||
initForm();
|
initForm();
|
||||||
|
|
||||||
|
if (typeof DOMTokenList !== 'undefined') {
|
||||||
|
initAnchorHL();
|
||||||
|
initShowPass();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}(document, window));
|
}(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 {
|
return {
|
||||||
init : function () {
|
init : function () {
|
||||||
|
if (!!Element.prototype.closest) {
|
||||||
crawl();
|
crawl();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}(document, window, navigator));
|
}(document, window, navigator));
|
||||||
|
|
|
@ -57,7 +57,10 @@ ForkBB.poll = (function (doc, win) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
init : function () {
|
init : function () {
|
||||||
if (0 !== inputPE) {
|
if (
|
||||||
|
0 !== inputPE
|
||||||
|
|| typeof DOMTokenList === 'undefined'
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +191,4 @@ ForkBB.poll = (function (doc, win) {
|
||||||
};
|
};
|
||||||
}(document, window));
|
}(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;
|
var conf, smiliesEnabled, linkEnabled;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!sceditor
|
!Object.assign
|
||||||
|
|| !sceditor
|
||||||
|| !(textarea = doc.querySelector(selector))
|
|| !(textarea = doc.querySelector(selector))
|
||||||
|| !(conf = JSON.parse(textarea.getAttribute(dataName)))
|
|| !(conf = JSON.parse(textarea.getAttribute(dataName)))
|
||||||
) {
|
) {
|
||||||
|
@ -109,6 +110,4 @@ ForkBB.editor = (function (doc, win) {
|
||||||
};
|
};
|
||||||
}(document, window));
|
}(document, window));
|
||||||
|
|
||||||
if (document.addEventListener && Object.assign) {
|
|
||||||
document.addEventListener("DOMContentLoaded", ForkBB.editor.init, false);
|
document.addEventListener("DOMContentLoaded", ForkBB.editor.init, false);
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue