1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title></title>
<script>
window.__ok = false
;(function () {
function loadFileSync (path) {
var xhr = new window.XMLHttpRequest()
xhr.open('GET', path, false)
xhr.send(null)
return xhr.status === 200 ? xhr.responseText : null
}
var contents = loadFileSync('../dist/js.cookie.js')
if (contents !== null) {
var script = document.createElement('script')
script.innerHTML =
'(function (){ return {}; })() ' + contents + ' window.__ok = true'
document.getElementsByTagName('head')[0].appendChild(script)
}
})()
</script>
</head>
<body></body>
</html>
|