mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-06 09:41:14 -04:00
23 lines
428 B
JavaScript
23 lines
428 B
JavaScript
(function () {
|
|
'use strict';
|
|
|
|
var htmlClasses;
|
|
var $pinnedElements;
|
|
|
|
function pinHtml() {
|
|
|
|
htmlClasses = $('html').attr('class');
|
|
$pinnedElements = $('head,body').children();
|
|
}
|
|
|
|
function restoreHtml() {
|
|
|
|
$('html').attr('class', htmlClasses);
|
|
$('head,body').children().not($pinnedElements).remove();
|
|
}
|
|
|
|
window.util = window.util || {};
|
|
window.util.pinHtml = pinHtml;
|
|
window.util.restoreHtml = restoreHtml;
|
|
|
|
}());
|