RewriteCond %{HTTP_HOST} ^site\.ru$
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://site.ru/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.site\.ru$
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.site.ru/$1 [R=301,L]
<html>
<head>
<script>
function main(){
a = b;
}
window.addEventListener('load', function(){
try {
main()
} catch (e){
proceedException(e)
}
})
</script>
<script src="file.js">
</script>
</head>
<body>
<div id="error">
</div>
</body>
</html>
function parseStackTrace(stacktrace){
let [_, functionName, fileName, row, __, column] = stacktrace.match(/at\s([^\s]+)\s\((.+?):(\d+)(:(\d+))?\)/)
return [functionName, fileName, row, column]
}
function proceedException(exception){
let [fn, file, row, column] = parseStackTrace(exception.stack),
node = document.createElement('p');
node.innerText = `Ошибка в файле: ${file}, функция <${fn}> на строке ${row}${column ? '(' + column + ' символ)' : ''} ${exception}`;
document.querySelector('#error').appendChild(node);
}
function helper(){
let c = 1, a = b;
}
function onload(){
helper();
}
window.addEventListener('load', function(){
try {
onload()
} catch (e){
proceedException(e)
}
})
greetings = Array ["Доброй ночи","Доброе утро","Добрый день","Добрый вечер"]
images = Array ["night","morning","afternoon","evening"]
offset = CurrentTime.Hours
if (offset > 23 || offset < 6) { offset = 0 }
else if (offset < 11) { offset = 1 }
else if (offset < 18) { offset = 2 }
else { offset = 3 }
std.io.write("<style>body: { background: url('images/"+images[offset]+".jpg')}</style>")
std.io.write(...)
....
std.io.write("<h2>"+greetings[offset]+"</h2>")
function click(x,y, scope){
scope = scope || window;
var ev = scope.document.createEvent("MouseEvent");
var el = scope.document.elementFromPoint(x,y);
ev.initMouseEvent(
"click",
true /* bubble */, true /* cancelable */,
scope, null,
x, y, 0, 0, /* coordinates */
false, false, false, false, /* modifier keys */
0 /*left*/, null
);
el.dispatchEvent(ev);
}
click(100,100, document.getElementById('originFrame').contentWindow)