<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
</style>
<script>
// Load native UI library
var ngui = require('nw.gui');
// Get the current window
var nwin = ngui.Window.get();
onload = function() {
nwin.show();
nwin.maximize();
require('nw.gui').Window.get().showDevTools(); // закомментировать если не нужна панель отладки
document.location = 'http://ТВОЙ_УРЛ_В ВЕБЕ';
};
</script>
</head>
<body></body>
</html>
{
"main": "index.html",
"name": "МОЯ_СУПЕР_ЦЭРЭМЭ",
"description": "ОПИСАНИЕ",
"version": "0.1.0",
"single-instance": true,
"keywords": [
"crm"
],
"window": {
"title": "МОЯ_СУПЕР_ЦЭРЭМЭ",
"toolbar": false,
"frame": true,
"width": 1280,
"height": 1024,
"position": "center",
"min_width": 1024,
"min_height": 768
},
"webkit": {
"plugin": true,
"page-cache": true
},
"author": "АФФТАР",
"maintainers": [
{
"name": "АФФТАР",
"email": "МЭЙЛ",
"web": "http://САЙТ"
}
]
}
function Some() {
this.id = Math.floor(Math.random() * 1000);
this.timer = setInterval(() => {
console.log('чем-то гажу в консоль');
}, 1000 * 1);
this.stop = () => {
console.log(this); // тут видно, что контекст действительно правильный
clearInterval(this.timer);
};
}
const some0 = new Some();
setTimeout(() => {
some0.stop();
}, 3000);
() => console.log('res')
ну или console.log.bind(console, 'res')
server{
server_name ваш_домен;
root /путь/где/всё/будет/лежать;
index index.html;
location / {
try_files $uri /index.html;
}
}
<snippet>
<content><![CDATA[(${0:$TM_SELECTED_TEXT}/2)]]></content>
<tabTrigger>dd</tabTrigger>
<scope>source.js</scope> //тут указываешь виды файлов где будет работать сниппет. можно через запятую
<description>dd</description>
</snippet>
{
"keys": ["ctrl+shift+1"],
"command": "insert_snippet",
"args": {"name": "Packages/User/dd.sublime-snippet"}
}