mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-08-13 16:54:01 +02:00
Fix a lot eslint errors.
This commit is contained in:
@@ -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;
|
||||
}());
|
||||
|
Reference in New Issue
Block a user