CARVIEW |
Select Language
HTTP/2 301
location: https://raw.githubusercontent.com/gartz/html/latest/html.js
accept-ranges: bytes
age: 0
date: Fri, 25 Jul 2025 15:02:47 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210055-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753455766.780421,VS0,VE1225
vary: Accept-Encoding
x-fastly-request-id: f52f4ac9bc95fcbf2ef9c53b147ee0fd9eb6a84a
content-length: 0
HTTP/2 200
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: W/"3fb47042d01845ba410e4ca1ed40853e62720bbe0d95170c3d4030615dd58658"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: ED05:22ABEA:107CB:21333:68839C95
content-encoding: gzip
accept-ranges: bytes
date: Fri, 25 Jul 2025 15:02:47 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210087-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753455767.056133,VS0,VE247
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
x-fastly-request-id: e8691cda2347fd3c7f761ac2b8514888c70f976b
expires: Fri, 25 Jul 2025 15:07:47 GMT
source-age: 0
content-length: 687
/**
* @license RequireJS html 0.0.2 Copyright (c) 2012-2012, Gabriel Reitz Giannattasio All Rights Reserved.
* Available via the MIT or new BSD license.
* see: https://github.com/gartz/html for details
*/
/*jslint regexp: true */
/*global define: false */
define(['text'], function (text) {
'use strict';
var html = {
load: function (name, req, load, config) {
// Do not bother with the work if a build
if (config.isBuild) {
load();
return;
}
req(['text!' + name], function (value) {
var doc = document.createDocumentFragment();
var re = /)((.|[\r\n])*)<\/html(.*)>|)((.|[\r\n])*)<\/head(.*)>/i;
var isDocument = re.test(value);
var el = document.createElement(isDocument ? 'html' : 'body');
el.innerHTML = value;
if (el.children) {
for (var i = 0, max = el.children.length; i < max; i++) {
doc.appendChild(el.children[0]);
}
}
var stash = doc.cloneNode(true);
doc.stash = function () {
if (this.childNodes) {
var nodes = this.childNodes;
for (var i = 0, max = nodes.length; i < max; i++) {
this.removeChild(nodes[0]);
}
}
this.appendChild(stash.cloneNode(true));
};
doc.path = name;
doc.source = value;
load(doc);
});
}
};
return html;
});