mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 12:07:10 -04:00
Publish tests.
This commit is contained in:
parent
5a8ecd593d
commit
c396800dfa
40 changed files with 21478 additions and 1 deletions
23
test/util/pin.js
Normal file
23
test/util/pin.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
(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;
|
||||
|
||||
}());
|
Loading…
Add table
Add a link
Reference in a new issue