mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Fix a lot eslint errors.
This commit is contained in:
parent
0c6143704a
commit
39ea94daa8
88 changed files with 3872 additions and 4930 deletions
|
@ -1,38 +1,33 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
var title;
|
||||
var htmlId;
|
||||
var htmlClasses;
|
||||
var bodyId;
|
||||
var bodyClasses;
|
||||
var $pinnedElements;
|
||||
|
||||
var title;
|
||||
var htmlId;
|
||||
var htmlClasses;
|
||||
var bodyId;
|
||||
var bodyClasses;
|
||||
var $pinnedElements;
|
||||
|
||||
function pinHtml() {
|
||||
|
||||
title = document.title;
|
||||
htmlId = $('html').attr('id');
|
||||
htmlClasses = $('html').attr('class');
|
||||
bodyId = $('body').attr('id');
|
||||
bodyClasses = $('body').attr('class');
|
||||
$pinnedElements = $('head,body').children();
|
||||
}
|
||||
|
||||
function restoreHtml() {
|
||||
|
||||
document.title = title;
|
||||
$('html').attr('id', htmlId);
|
||||
$('html').attr('class', htmlClasses);
|
||||
$('body').attr('id', bodyId);
|
||||
$('body').attr('class', bodyClasses);
|
||||
$('head,body').children().not($pinnedElements).remove();
|
||||
if (window.localStorage && window.localStorage.clear) {
|
||||
window.localStorage.clear();
|
||||
function pinHtml() {
|
||||
title = document.title;
|
||||
htmlId = $('html').attr('id');
|
||||
htmlClasses = $('html').attr('class');
|
||||
bodyId = $('body').attr('id');
|
||||
bodyClasses = $('body').attr('class');
|
||||
$pinnedElements = $('head,body').children();
|
||||
}
|
||||
}
|
||||
|
||||
window.util = window.util || {};
|
||||
window.util.pinHtml = pinHtml;
|
||||
window.util.restoreHtml = restoreHtml;
|
||||
function restoreHtml() {
|
||||
document.title = title;
|
||||
$('html').attr('id', htmlId);
|
||||
$('html').attr('class', htmlClasses);
|
||||
$('body').attr('id', bodyId);
|
||||
$('body').attr('class', bodyClasses);
|
||||
$('head,body').children().not($pinnedElements).remove();
|
||||
if (window.localStorage && window.localStorage.clear) {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
}
|
||||
|
||||
window.util = window.util || {};
|
||||
window.util.pinHtml = pinHtml;
|
||||
window.util.restoreHtml = restoreHtml;
|
||||
}());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue