Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var channel = ioService.newChannel(aURL, null, null);
var input = channel.open();
scriptableStream.init(input);
var str = scriptableStream.read(input.available());
scriptableStream.close();
input.close();
return str;
}
// window.openDialog('chrome://global/content/console.xul', '_blank');
try {
// Load snippets
var snippets = getContents('chrome://emmet/content/js/snippets.json') || '{}';
require('bootstrap').loadSystemSnippets(snippets);
// Load extensions
var extPath = require('file').createPath(DirIO.get('Home').path, 'emmet', function(extPath) {
var rootDir = FileIO.open(extPath);
if (rootDir.exists() && rootDir.isDirectory()) {
var extFiles = _.reject(DirIO.read(rootDir, true), function(f) {
return f.isDirectory();
});
extFiles = _.map(extFiles, function(f) {
return FileIO.path(f);
});
require('bootstrap').loadExtensions(extFiles);
}
emmet.exec(function(require, _) {
var file = require('file');
var coreDir = file.createPath(Editor.nppDir, 'plugins\\jN\\includes');
// path to Emmet extensions and user's custom snippets
var extensionsDir = file.createPath(Editor.nppDir, 'plugins\\emmet-extensions');
var bootstrap = require('bootstrap');
// load snippets
bootstrap.loadSystemSnippets(file.read(file.createPath(coreDir, 'snippets.json')));
// get keymap
var keymap = bootstrap.parseJSON(file.read(file.createPath(coreDir, 'keymap.json')));
// load extensions
var fso = new ActiveXObject("Scripting.FileSystemObject");
if (fso.FolderExists(extensionsDir)) {
var fileList = [];
var extensionFiles = fso.GetFolder(extensionsDir).Files;
var fileEnum = new Enumerator(extensionFiles);
for (; !fileEnum.atEnd(); fileEnum.moveNext()) {
fileList.push(fileEnum.item().Path);
}
bootstrap.loadExtensions(fileList);
require('actions\\wrapWithAbbreviation');
require('actions\\matchPair');
require('actions\\editPoints');
require('actions\\selectItem');
require('actions\\selectLine');
require('actions\\lineBreak');
require('actions\\mergeLines');
require('actions\\toggleComment');
require('actions\\splitJoinTag');
require('actions\\removeTag');
require('actions\\evaluateMath');
require('actions\\increment_decrement');
require('actions\\base64');
require('actions\\reflectCSSValue');
require('actions\\updateImageSize');
require('bootstrap').loadSystemSnippets(require('file').read(context.Root + '\\Assets\\snippets.json'));
context.startup(JSON.stringify(require('actions').getMenu()));
});
function objcLoadSystemSnippets(data) {
require('bootstrap').loadSystemSnippets(objcToString(data));
}