mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Clean code.
This commit is contained in:
parent
41b199c578
commit
c732fbb363
2 changed files with 4 additions and 9 deletions
|
@ -1,17 +1,20 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
var title;
|
||||
var htmlClasses;
|
||||
var $pinnedElements;
|
||||
|
||||
function pinHtml() {
|
||||
|
||||
title = document.title;
|
||||
htmlClasses = $('html').attr('class');
|
||||
$pinnedElements = $('head,body').children();
|
||||
}
|
||||
|
||||
function restoreHtml() {
|
||||
|
||||
document.title = title;
|
||||
$('html').attr('class', htmlClasses);
|
||||
$('head,body').children().not($pinnedElements).remove();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue