fix(runtime): remove stale aksrt namespace dependency
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
}
|
||||
|
||||
function handleDelete(commentEl, commentId) {
|
||||
var msg = (window.aksrt && aksrt.__) ? aksrt.__('comment_confirm_delete', '确定要删除这条评论吗?') : '确定要删除这条评论吗?';
|
||||
var msg = '确定要删除这条评论吗?';
|
||||
var doDelete = function () {
|
||||
restPost('/comment/delete', { comment_id: commentId })
|
||||
.then(function (result) {
|
||||
@@ -118,9 +118,7 @@
|
||||
.catch(function () { notyf('网络错误', 'danger'); });
|
||||
};
|
||||
|
||||
if (window.aksrt && aksrt.confirm) {
|
||||
aksrt.confirm(msg).then(function (ok) { if (ok) doDelete(); });
|
||||
} else if (window.confirm(msg)) {
|
||||
if (window.confirm(msg)) {
|
||||
doDelete();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
themeInitialized = true;
|
||||
|
||||
var stored = getStoredTheme();
|
||||
var configuredMode = (window.aksrtData && aksrtData.themeMode) || "light";
|
||||
var configuredMode = (window.aksrtData && window.aksrtData.themeMode) || "light";
|
||||
if (stored === "dark" || stored === "light") {
|
||||
applyTheme(stored);
|
||||
} else {
|
||||
@@ -262,12 +262,6 @@
|
||||
bindToggle("dropdown-theme-toggle");
|
||||
bindToggle("float-theme-toggle");
|
||||
bindToggle("theme-toggle-mobile");
|
||||
|
||||
aksrt.toggleTheme = function (event) {
|
||||
var next = document.body.classList.contains("theme-dark") ? "light" : "dark";
|
||||
setStoredTheme(next);
|
||||
runThemeTransition(next, event);
|
||||
};
|
||||
}
|
||||
|
||||
if (document.readyState === "loading") {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user