rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
} else if((match = request.match(/[\w.0-9$\/]/))) { var req = match[0], isAbsolute = req.charAt(0) == '/'; req = req.replace(/^\ .replace(/\.\.?\ .replace(/\ imports[0] = { from: isAbsolute ? req : resolveRelativePath(req, path), as: req };
function resolveImportRequest(path, request) { var match, imports = []; if((match = request.match(/^(from|external)\s+([\w.$]+)\s+import\s+(.*)$/))) { imports[0] = { from: resolveRelativePath(match[2], path), external: match[1] == 'external', "import": {} }; match[3].replace(/\s*([\w.$*]+)(?:\s+as\s+(...
throw new (typeof SyntaxError != 'undefined' ? SyntaxError : Error)(result || 'invalid jsio command: jsio(\'' + request + '\')');
throw new (typeof SyntaxError != 'undefined' ? SyntaxError : Error)(String(result) || 'invalid jsio command: jsio(\'' + request + '\')');
function resolveImportRequest(context, path, request, opts) { var cmds = jsio.__cmds, imports = [], result = false; for (var i = 0, imp; imp = cmds[i]; ++i) { if ((result = imp(context, path, request, opts, imports))) { break; } } if (result !== true) { throw new (typeof SyntaxError != 'undefined' ? Sy...
return [util.splitPath(util.resolveRelativeModule(modulePath, directory) + '.js')];
return [makeModuleDef(util.resolveRelativeModule(modulePath, directory))];
resolveModulePath: function(modulePath, directory) { // resolve relative paths if(modulePath.charAt(0) == '.') { return [util.splitPath(util.resolveRelativeModule(modulePath, directory) + '.js')]; } // resolve absolute paths with respect to jsio packages/ var pathSegments = modulePath.split('.'), ...
return [util.splitPath(util.addEndSlash(jsio.__path[baseMod]) + pathString + '.js')];
return [makeModuleDef(util.buildPath(jsio.__path[baseMod], pathString))];
resolveModulePath: function(modulePath, directory) { // resolve relative paths if(modulePath.charAt(0) == '.') { return [util.splitPath(util.resolveRelativeModule(modulePath, directory) + '.js')]; } // resolve absolute paths with respect to jsio packages/ var pathSegments = modulePath.split('.'), ...
var path = util.addEndSlash(paths[i]), possibility = util.splitPath(path + pathString + '.js'); possibility.baseMod = baseMod; possibility.basePath = path; out.push(possibility);
out.push(makeModuleDef(util.buildPath(paths[i], pathString), baseMod, paths[i]));
resolveModulePath: function(modulePath, directory) { // resolve relative paths if(modulePath.charAt(0) == '.') { return [util.splitPath(util.resolveRelativeModule(modulePath, directory) + '.js')]; } // resolve absolute paths with respect to jsio packages/ var pathSegments = modulePath.split('.'), ...
function ResolveParents(field) { for (c=0;c<TreeParents[field].length;c++) {
function ResolveParents( field ) { for( var c = 0; c < TreeParents[field].length; c++ ) {
function ResolveParents(field) { for (c=0;c<TreeParents[field].length;c++) { //resolve nodeparent to internal node id var p=0;found=false; for (p=0;p<TreeID[field].length;p++) { if (TreeID[field][p]==TreeParents[field][c]) {found=true;break;} } if (found) {TreeParents[field][c]=p;} if (TreeP...
var p=0;found=false; for (p=0;p<TreeID[field].length;p++) { if (TreeID[field][p]==TreeParents[field][c]) {found=true;break;} } if (found) {TreeParents[field][c]=p;} if (TreeParents[field][c]==-1) {TreeParents[field][c]=-1;}
found = false; for( var p = 0; p < TreeID[field].length; p++ ) { if ( TreeID[field][p] == TreeParents[field][c] ) { found = true; break; }
function ResolveParents(field) { for (c=0;c<TreeParents[field].length;c++) { //resolve nodeparent to internal node id var p=0;found=false; for (p=0;p<TreeID[field].length;p++) { if (TreeID[field][p]==TreeParents[field][c]) {found=true;break;} } if (found) {TreeParents[field][c]=p;} if (TreeP...
}
function ResolveParents(field) { for (c=0;c<TreeParents[field].length;c++) { //resolve nodeparent to internal node id var p=0;found=false; for (p=0;p<TreeID[field].length;p++) { if (TreeID[field][p]==TreeParents[field][c]) {found=true;break;} } if (found) {TreeParents[field][c]=p;} if (TreeP...
i = 0, j = -1,
resolveRelativeModule: function(modulePath, directory) { /* ...test -> ../../test .test -> ./test foo..test -> test .foo..test -> ./test foo...test -> ../test */ var result = [], parts = modulePath.split('.'), i = 0, j = -1, len = parts.length, relative = false; if (len...
relative = false;
relative = (len > 1 && !parts[0]), i = relative ? 0 : -1;
resolveRelativeModule: function(modulePath, directory) { /* ...test -> ../../test .test -> ./test foo..test -> test .foo..test -> ./test foo...test -> ../test */ var result = [], parts = modulePath.split('.'), i = 0, j = -1, len = parts.length, relative = false; if (len...
if (len > 1 && !parts[0]) { relative = true; ++i; } do { if (!parts[i]) { if (j >= 0 && result[j].charAt(0) == '.') { result.pop(); --j; } else { result.push('..'); ++j; } } else { result.push(parts[i]); ++j; } } while(++i < len); result = result.join('/'); return relative ? util.resolveRelativePath(directory + resul...
while(++i < len) { result.push(parts[i] ? parts[i] : '..'); } return util.buildPath(relative ? directory : '', result.join('/'));
resolveRelativeModule: function(modulePath, directory) { /* ...test -> ../../test .test -> ./test foo..test -> test .foo..test -> ./test foo...test -> ../test */ var result = [], parts = modulePath.split('.'), i = 0, j = -1, len = parts.length, relative = false; if (len...
do { var oldPath = path; } while(oldPath != (path = path.replace(/(^|\/)(?!\.\.\/)([^\/]+)\/\.\.\
path = path.replace(/\/\ var o; while((o = path) != (path = path.replace(/(^|\/)(?!\.?\.\/)([^\/]+)\/\.\.\ }
resolveRelativePath: function(path) { do { var oldPath = path; } while(oldPath != (path = path.replace(/(^|\/)(?!\.\.\/)([^\/]+)\/\.\.\//g, '/'))); return path; },
while((o = path) != (path = path.replace(/(^|\/)(?!\.?\.\/)([^\/]+)\/\.\.\ }
while((o = path) != (path = path.replace(/(^|\/)(?!\.?\.\/)([^\/]+)\/\.\.\
resolveRelativePath: function(path) { path = path.replace(/\/\//g, '/').replace(/\/\.\//g, '/'); var o; while((o = path) != (path = path.replace(/(^|\/)(?!\.?\.\/)([^\/]+)\/\.\.\//g, '/'))) { print('| RESOLVE', path) } return path; },
function resolveRelativePath(modulePath, path, pathSep) { if(!path || (pathSep = pathSep || '.') != modulePath.charAt(0)) { return modulePath; } path += '.' + modulePath; do { var oldPath = path; } while(oldPath != (path = path.replace(/\.[^.]+\.\./g, '.'))); return path; }
resolveRelativePath: function(path) { do { var oldPath = path; } while(oldPath != (path = path.replace(/(^|\/)(?!\.\.\/)([^\/]+)\/\.\.\ return path; },
function resolveRelativePath(modulePath, path, pathSep) { // does the modulePath need to be resolved, i.e. is it a relative path? if(!path || (pathSep = pathSep || '.') != modulePath.charAt(0)) { return modulePath; } path += '.' + modulePath; do { var oldPath = path; } while(oldPath != (path = path.replace(/\.[...
var i = 1; while(modulePath.charAt(i) == pathSep) { ++i; } path = path.split(pathSep).slice(0, -i); if(path.length) { path = path.join(pathSep); if(path.charAt(path.length - 1) != pathSep) { path += pathSep; } } return path + modulePath.substring(i);
path += '.' + modulePath; do { var oldPath = path; } while(oldPath != (path = path.replace(/\.[^.]+\.\./g, '.'))); return path;
function resolveRelativePath(modulePath, path, pathSep) { // does the modulePath need to be resolved, i.e. is it a relative path? if(!path || (pathSep = pathSep || '.') != modulePath.charAt(0)) { return modulePath; } var i = 1; while(modulePath.charAt(i) == pathSep) { ++i; } path = path.split(pathSep).slice(0, ...
function resolveRelativePath(pkg, path, pathSep) { if(!path || (pathSep = pathSep || '.') != pkg.charAt(0)) { return pkg; }
function resolveRelativePath(modulePath, path, pathSep) { if(!path || (pathSep = pathSep || '.') != modulePath.charAt(0)) { return modulePath; }
function resolveRelativePath(pkg, path, pathSep) { // does the pkg need to be resolved, i.e. is it a relative path? if(!path || (pathSep = pathSep || '.') != pkg.charAt(0)) { return pkg; } var i = 1; while(pkg.charAt(i) == pathSep) { ++i; } path = path.split(pathSep).slice(0, -i); if(path.length) { path = pa...
while(pkg.charAt(i) == pathSep) { ++i; }
while(modulePath.charAt(i) == pathSep) { ++i; }
function resolveRelativePath(pkg, path, pathSep) { // does the pkg need to be resolved, i.e. is it a relative path? if(!path || (pathSep = pathSep || '.') != pkg.charAt(0)) { return pkg; } var i = 1; while(pkg.charAt(i) == pathSep) { ++i; } path = path.split(pathSep).slice(0, -i); if(path.length) { path = pa...
return path + pkg.substring(i);
return path + modulePath.substring(i);
function resolveRelativePath(pkg, path, pathSep) { // does the pkg need to be resolved, i.e. is it a relative path? if(!path || (pathSep = pathSep || '.') != pkg.charAt(0)) { return pkg; } var i = 1; while(pkg.charAt(i) == pathSep) { ++i; } path = path.split(pathSep).slice(0, -i); if(path.length) { path = pa...
respondToReadyState: function(readyState) { var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); if (state == 'Complete') { try { this._complete = true; (this.options['on' + response.status] || this.options['on' + (this.success() ? 'Success' : 'Failure')] || Prototype.emptyFunction)(respons...
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(...
respondToReadyState: function(readyState) { var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); if (state == 'Complete') { try { this._complete = true; (this.options['on' + response.status] || this.options['on' + (this.success() ? 'Success' : 'Failure')] ...
if (positions[i]) { positions[i].value = allNames[i][2]; } if (eMailAddresses[i]) { eMailAddresses[i].value = allNames[i][3]; }
function restoreSeparateNameFields() { var machineReadableField = $("tx_seminars_pi1_registration_editor_structured_attendees_names"); if (!machineReadableField || machineReadableField.value.empty() || !machineReadableField.value.isJSON()) { return; } var firstNames = $$("#tx_seminars_pi1_registration_editor_separate...
if (xpath.core.axisGuides.reverseDescendant(k) === false)
if (xpath.core.axisGuides.reverseOrderDescendant(k, cb) === false)
reverseOrderDescendant: function(n, cb) { /// @todo Re-write this function to be iterative, not recursive... if (n.hasChildNodes()) for (var k = n.lastChild; k; k = k.previousSibling) if (xpath.core.axisGuides.reverseDescendant(k) === false) return ...
var index = $(this).attr('name');
var index = $(this).attr('id');
rightToLeft: function() { var self = this; $(this.right_select_id).find('option:selected').each(function(){ var index = $(this).attr('name'); self.leftSelectionsArray[index] = this; self.rightSelectionsArray[index] = null; $(this).remove(); }); this.refreshOptions(this.left_select_...
if (SC.typeOf(val) === SC.T_NUMBER) val += 'deg';
if (SC.typeOf(val) === SC.T_NUMBER || val === 0) val += 'deg';
rotate: function(val){ if (SC.typeOf(val) === SC.T_NUMBER) val += 'deg'; return 'rotate('+val+')'; },
return SC.FormRowView.extend({
return {
row: function(label, fieldType) { if (!fieldType) { fieldType = label; label = null; } // now, create like normal return SC.FormRowView.extend({ label: label, childViews: "_singleField".w(), _singleField: fieldType }); }
}); }
}; },
row: function(label, fieldType) { if (!fieldType) { fieldType = label; label = null; } // now, create like normal return SC.FormRowView.extend({ label: label, childViews: "_singleField".w(), _singleField: fieldType }); }
message.payload = data;
message.data = data;
rpc: function(channel, data, callback) { var replyTo = channel + "#" + dojox.cometd.clientId; console.debug("RPC:" + channel + ", " + data); console.debug("RPC: setting replyTo: " + replyTo); var message = new Object(); message.payload = data; message.replyTo = replyTo; ...
this._setupIdle();
run: function(limit) { this.set("isRunning", YES); if (!limit) limit = this.get("runLimit"); var task, start = Date.now(); while (task = this.next()) { task.run(this); // check if the limit has been exceeded if (Date.now() - start > limit) break; } // set up idle tim...
&& result !== null) {
&& result !== null && example.output) {
doctest.JSRunner.prototype.run = function (example) { this.capturer = new doctest.OutputCapturer(); this.capturer.capture(); try { var result = window.eval(example.example); } catch (e) { writeln('Error: ' + (e.message || e)); var result = null; logDebug('Traceback for error', e); if (e.stack) { ...
run: function () { func.apply(self, args); }
run: function () { func.apply(self, args || []); }
run: function () { func.apply(self, args); }
process.run(blocking, args.map(String), args.length);
process.run(false, args.map(String), args.length); try { if (blocking) while (process.isRunning) liberator.threadYield(false, true); } catch (e) { process.kill(); throw e; }
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = File(program, true); else { let dirs = services.get("environment").get("PATH").split(liberator.has("Win32") ? ";" : ":"); ...
dirs = [io.getCurrentDirectory().path].concat(dirs);
dirs = [io.cwd].concat(dirs);
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(dactyl.has("WINNT") ? ";" : ":"); ...
file = File.joinPaths(dir, program);
file = File.joinPaths(dir, program, io.cwd);
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(dactyl.has("WINNT") ? ";" : ":"); ...
file = File.joinPaths(dir, program + extension);
file = File.joinPaths(dir, program + extension, io.cwd);
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(dactyl.has("WINNT") ? ";" : ":"); ...
let isMain = services.get("threading").isMainThread;
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(util.OS.isWindows ? ";" : ":"); ...
process.run(blocking && !isMain, args.map(String), args.length);
process.run(false, args.map(String), args.length);
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(util.OS.isWindows ? ";" : ":"); ...
if (blocking && isMain)
if (blocking)
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(util.OS.isWindows ? ";" : ":"); ...
let dirs = services.get("environment").get("PATH").split(dactyl.has("Win32") ? ";" : ":");
let dirs = services.get("environment").get("PATH").split(dactyl.has("WINNT") ? ";" : ":");
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(dactyl.has("Win32") ? ";" : ":"); ...
if (dactyl.has("Win32"))
if (dactyl.has("WINNT"))
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(dactyl.has("Win32") ? ";" : ":"); ...
if (dactyl.has("Win32")) {
if (dactyl.has("WINNT")) {
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(dactyl.has("Win32") ? ";" : ":"); ...
process.run(false, args.map(String), args.length);
process.run(blocking && !isMain, args.map(String), args.length);
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(util.isOS("WINNT") ? ";" : ":"); ...
if (blocking)
if (blocking && isMain)
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.get("environment").get("PATH").split(util.isOS("WINNT") ? ";" : ":"); ...
logDebug('Error in expression: ' + example.example);
logWarn('Error in expression: ' + example.example);
doctest.JSRunner.prototype.run = function (example) { this.capturer = new doctest.OutputCapturer(); this.capturer.capture(); try { var result = window.eval(example.example); } catch (e) { writeln('Error: ' + (e.message || e)); var result = null; logDebug('Error in expression: ' + example.example); lo...
doctest.logTraceback(e);
if (tracebackLines) { for (var i=0; i<tracebackLines.length; i++) { logDebug(tracebackLines[i]); } }
doctest.JSRunner.prototype.run = function (example) { this.capturer = new doctest.OutputCapturer(); this.capturer.capture(); try { var result = window.eval(example.example); } catch (e) { writeln('Error: ' + (e.message || e)); var result = null; logDebug('Error in expression: ' + example.example); lo...
try {
if (SC.ExceptionHandler && SC.ExceptionHandler.enabled) { try { if(forceNested || !alreadyRunning) SC.RunLoop.begin(); if (callback) callback.call(target); if(forceNested || !alreadyRunning) SC.RunLoop.end(); } catch (e) { SC.ExceptionHandler.handleException(e); if (!SC.browser.msie) { throw e; } } } else {
SC.run = function(callback, target, forceNested) { var alreadyRunning = SC.RunLoop.isRunLoopInProgress(); try { if(forceNested || !alreadyRunning) SC.RunLoop.begin(); if (callback) callback.call(target); if(forceNested || !alreadyRunning) SC.RunLoop.end(); } catch (e) { if (SC.ExceptionHandler) { ...
} catch (e) { if (SC.ExceptionHandler) { SC.ExceptionHandler.handleException(e); } if (!SC.browser.msie) { throw e; }
SC.run = function(callback, target, forceNested) { var alreadyRunning = SC.RunLoop.isRunLoopInProgress(); try { if(forceNested || !alreadyRunning) SC.RunLoop.begin(); if (callback) callback.call(target); if(forceNested || !alreadyRunning) SC.RunLoop.end(); } catch (e) { if (SC.ExceptionHandler) { ...
blocking = !!blocking;
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.environment.get("PATH").split(util.OS.isWindows ? ";" : ":"); ...
let process = services.Process(); process.init(file);
let process = services.Process(file);
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.environment.get("PATH").split(util.OS.isWindows ? ";" : ":"); ...
if (blocking)
if (callable(blocking)) var timer = services.Timer( function () { if (!process.isRunning) { timer.cancel(); callback(); } }, 100, services.Timer.TYPE_REPEATING_SLACK); else if (blocking)
run: function (program, args, blocking) { args = args || []; blocking = !!blocking; let file; if (File.isAbsolutePath(program)) file = io.File(program, true); else { let dirs = services.environment.get("PATH").split(util.OS.isWindows ? ";" : ":"); ...
if (e instanceof Abort) { throw e; }
doctest.JSRunner.prototype.run = function (example) { this.capturer = new doctest.OutputCapturer(); this.capturer.capture(); try { var result = window.eval(example.example); } catch (e) { var tracebackLines = doctest.formatTraceback(e); writeln('Error: ' + (e.message || e)); var result = null; logWar...
try {
if (SC.ExceptionHandler && SC.ExceptionHandler.enabled) { try { SC.RunLoop.begin(); if (callback) callback.call(target); SC.RunLoop.end(); } catch (e) { SC.ExceptionHandler.handleException(e); if (!SC.browser.msie) { throw e; } } } else {
SC.run = function(callback, target, useExistingRunLoop) { if(useExistingRunLoop) { var alreadyRunning = SC.RunLoop.isRunLoopInProgress(); if(!alreadyRunning) SC.RunLoop.begin(); callback.call(target); if(!alreadyRunning) SC.RunLoop.end(); } else { try { SC.RunLoop.begin(); if (callback) callb...
} catch (e) { if (SC.ExceptionHandler) { SC.ExceptionHandler.handleException(e); } if (!SC.browser.msie) { throw e; }
SC.run = function(callback, target, useExistingRunLoop) { if(useExistingRunLoop) { var alreadyRunning = SC.RunLoop.isRunLoopInProgress(); if(!alreadyRunning) SC.RunLoop.begin(); callback.call(target); if(!alreadyRunning) SC.RunLoop.end(); } else { try { SC.RunLoop.begin(); if (callback) callb...
function run(path, cmd, opts, inlineOpts) { var newOpts = JS.merge({dontCompileJsio: true}, opts, inlineOpts); if (newOpts.preprocessors) { for (var i = 0, len = newOpts.preprocessors.length; i < len; ++i) { if (newOpts.preprocessors[i] == 'compiler') { break; } } if (i == len) { newOpts.preprocessors.push('compiler'...
function run(moduleDef, cmd, opts, inlineOpts) { var newOpts = mergeOpts(opts, inlineOpts); logger.info('from', moduleDef.directory + moduleDef.filename + ': ', cmd, newOpts); JSIO.__importer({}, moduleDef.directory, moduleDef.filename, cmd, newOpts);
function run(path, cmd, opts, inlineOpts) { var newOpts = JS.merge({dontCompileJsio: true}, opts, inlineOpts); // add compiler to the end of the preprocessors list if (newOpts.preprocessors) { for (var i = 0, len = newOpts.preprocessors.length; i < len; ++i) { if (newOpts.preprocessors[i] == 'compiler') { break;...
run: function () { func.apply(self, args); }
run: function () { func.apply(self, args || []); }
function Runnable(self, func, args) { return { QueryInterface: XPCOMUtils.generateQI([Ci.nsIRunnable]), run: function () { func.apply(self, args); } };}
var time = 0.1;
var time = 100; var maxTime = doctest._waitTimeout || doctest.defaultTimeout;
doctest.JSRunner.prototype.runParsed = function (parsed, index, finishedCallback) { var self = this; index = index || 0; if (index >= parsed.examples.length) { if (finishedCallback) { finishedCallback(); } return; } var example = parsed.examples[index]; if (typeof example == 'undefined') { throw(...
logDebug('Condition not met, trying again later');
if ((new Date()).getTime() - start > maxTime) { var msg = 'Error: wait(' + repr(condition) + ') has timed out'; writeln(msg); logDebug(msg); logDebug('Timeout after ' + ((new Date()).getTime() - start) + ' milliseconds'); finishThisRun(); return; }
doctest.JSRunner.prototype.runParsed = function (parsed, index, finishedCallback) { var self = this; index = index || 0; if (index >= parsed.examples.length) { if (finishedCallback) { finishedCallback(); } return; } var example = parsed.examples[index]; if (typeof example == 'undefined') { throw(...
var time = 0;
var time = doctest._waitCond;
doctest.JSRunner.prototype.runParsed = function (parsed, index, finishedCallback) { var self = this; index = index || 0; if (index >= parsed.examples.length) { if (finishedCallback) { finishedCallback(); } return; } var example = parsed.examples[index]; if (typeof example == 'undefined') { throw(...
if (doctest._AbortCalled) { logWarn('Abort() called'); return; }
doctest.JSRunner.prototype.runParsed = function (parsed, index, finishedCallback) { var self = this; index = index || 0; if (index >= parsed.examples.length) { if (finishedCallback) { finishedCallback(); } return; } var example = parsed.examples[index]; if (typeof example == 'undefined') { throw(...
var failures = [];
var failures = [], run = 0;
function runTests() { var failures = []; for (var name in this) { if (name.length > 5 && name.substr(0, 5) == "test_") { try {this[name]();} catch (e) {failures.push(name + ": " + String(e));} } } if (failures.length) print(failures.length + " failures:\n " + failures.join("\n ")); else pri...
print(run + " test run...");
function runTests() { var failures = []; for (var name in this) { if (name.length > 5 && name.substr(0, 5) == "test_") { try {this[name]();} catch (e) {failures.push(name + ": " + String(e));} } } if (failures.length) print(failures.length + " failures:\n " + failures.join("\n ")); else pri...
if (failures.length) { print(failures.length + " failures:"); print(" " + failures.join("\n ")); } else {
if (failures.length) print(failures.length + " failures:\n " + failures.join("\n ")); else
function runTests() { var failures = []; for (var name in this) { if (name.length > 5 && name.substr(0, 5) == "test_") { try {this[name]();} catch (e) {failures.push(name + ": " + String(e));} } } if (failures.length) { print(failures.length + " failures:"); print(" " + failures.join("\n "))...
}
function runTests() { var failures = []; for (var name in this) { if (name.length > 5 && name.substr(0, 5) == "test_") { try {this[name]();} catch (e) {failures.push(name + ": " + String(e));} } } if (failures.length) { print(failures.length + " failures:"); print(" " + failures.join("\n "))...
completion.file(context, true, dir + context.filter);
completion.file(context, args, true, dir + context.filter);
completion.runtime = function (context) { for (let [, dir] in Iterator(options["runtimepath"])) context.fork(dir, 0, this, function (context) { dir = dir.replace("/+$", "") + "/"; completion.file(context, true, dir + context.filter); ...
context.keys.text = function (f) f.path.substr(dir.length);
context.keys.text = function (f) this.path.substr(dir.length);
completion.runtime = function (context) { for (let [, dir] in Iterator(options["runtimepath"])) context.fork(dir, 0, this, function (context) { dir = dir.replace("/+$", "") + "/"; completion.file(context, true, dir + context.filter); ...
n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,...
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}f...
n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,...
let val = this._loadPreference(name, null, false); let def = this._loadPreference(name, null, true); let lib = this._loadPreference(Options.SAVED + name); if (lib == null && val != def || val != lib) {
let curval = this._loadPreference(name, null, false); let defval = this._loadPreference(name, null, true); let saved = this._loadPreference(Options.SAVED + name); if (saved == null && curval != defval || curval != saved) {
safeSetPref: function (name, value, message) { let val = this._loadPreference(name, null, false); let def = this._loadPreference(name, null, true); let lib = this._loadPreference(Options.SAVED + name); if (lib == null && val != def || val != lib) { let msg = "Warning: setting ...
for (let elem in values(this._modeStack))
for (let elem in array.iterValues(this._modeStack))
save: function (id, obj, prop) { if (!(id in this.boundProperties)) for (let elem in values(this._modeStack)) elem.saved[id] = { obj: obj, prop: prop, value: obj[prop] }; this.boundProperties[id] = { obj: Cu.getWeakReference(obj), prop: prop }; },
if (!(id in this.boundProperties)) for (let elem in values(this._modeStack)) elem.saved[id] = { obj: obj, prop: prop, value: obj[prop] };
save: function (id, obj, prop) { this.boundProperties[id] = { obj: Cu.getWeakReference(obj), prop: prop }; },
if((''+this.ps[key]) !== body) this.ps[key] = body;
if(key === 'body' && this.ps[key] !== body) delete ps['flavors']; this.ps[key] = body;
save: function(){ Object.keys(this.savers).forEach(function(key){ var body = this.savers[key].body(); if((''+this.ps[key]) !== body) this.ps[key] = body; }, this); background.TBRL.Popup.contents[this.ps.itemUrl] = this.ps; },
if(this.ps[key] !== body)
if((''+this.ps[key]) !== body)
save: function(){ Object.keys(this.savers).forEach(function(key){ var body = this.savers[key].body(); if(this.ps[key] !== body) this.ps[key] = body; }, this); background.TBRL.Popup.contents[this.ps.itemUrl] = this.ps; },
options.setPref("browser.download.lastDir", io.getCurrentDirectory().path);
options.setPref("browser.download.lastDir", io.cwd);
saveLink: function (elem, skipPrompt) { let doc = elem.ownerDocument; let url = window.makeURLAbsolute(elem.baseURI, elem.href); let text = elem.textContent; try { window.urlSecurityCheck(url, doc.nodePrincipal); // we always want to save that link relative to the...
scan: function(pattern, iterator) { this.gsub(pattern, iterator); return String(this); },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(...
scan: function(pattern, iterator) { this.gsub(pattern, iterator); return String(this); },
var td = toscore.toLowerCase(), tdLength = toscore.length, abbLength = abb.length; if(tdLength < abbLength) return 0.0; var ad = abb.toLowerCase(), ahead, atail, found, score = null, tail, tail_score, penalty = 0, skipped; for(var pivot = abbLength; 0 < pivot; --pivot){ ahead = ad.slice(0, pivot); atail = ad.slice(pivo...
var td = toscore.toLowerCase(), tdLength = toscore.length, pivot = abb.length; if(tdLength < pivot) return 0.0; var ad = abb.toLowerCase(), ahead, atail, found, score, tail, tail_score, penalty, skipped; for(; 0 < pivot; --pivot){ ahead = ad.substring(0, pivot); atail = ad.substring(pivot) || "";
scoreFor: function(toscore, abb){ if(!abb) return 0.9; var td = toscore.toLowerCase(), tdLength = toscore.length, abbLength = abb.length; if(tdLength < abbLength) return 0.0; var ad = abb.toLowerCase(), ahead, atail, found, score = null, tail, tail_score, penalty = 0, skipped; for(var pivot = abbLength...
tail = toscore.slice(found+pivot) || "";
tail = toscore.substring(found+pivot) || "";
scoreFor: function(toscore, abb){ if(!abb) return 0.9; var td = toscore.toLowerCase(), tdLength = toscore.length, abbLength = abb.length; if(tdLength < abbLength) return 0.0; var ad = abb.toLowerCase(), ahead, atail, found, score = null, tail, tail_score, penalty = 0, skipped; for(var pivot = abbLength...
skipped = toscore.slice(0, found);
skipped = toscore.substring(0, found);
scoreFor: function(toscore, abb){ if(!abb) return 0.9; var td = toscore.toLowerCase(), tdLength = toscore.length, abbLength = abb.length; if(tdLength < abbLength) return 0.0; var ad = abb.toLowerCase(), ahead, atail, found, score = null, tail, tail_score, penalty = 0, skipped; for(var pivot = abbLength...
} else if(/^[A-Z]/.test(toscore.slice(found))){
} else if(/^[A-Z]/.test(toscore.substring(found))){
scoreFor: function(toscore, abb){ if(!abb) return 0.9; var td = toscore.toLowerCase(), tdLength = toscore.length, abbLength = abb.length; if(tdLength < abbLength) return 0.0; var ad = abb.toLowerCase(), ahead, atail, found, score = null, tail, tail_score, penalty = 0, skipped; for(var pivot = abbLength...
} else { penalty = 0;
scoreFor: function(toscore, abb){ if(!abb) return 0.9; var td = toscore.toLowerCase(), tdLength = toscore.length, abbLength = abb.length; if(tdLength < abbLength) return 0.0; var ad = abb.toLowerCase(), ahead, atail, found, score = null, tail, tail_score, penalty = 0, skipped; for(var pivot = abbLength...
return self;
function Script(file) { let self = plugins[file.path]; if (self) { if (self.onUnload) self.onUnload(); return self; } else self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUppe...
else self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUpperCase()); self.PATH = file.path; self.CONTEXT = self;
else { self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUpperCase()); self.PATH = file.path; self.CONTEXT = self;
function Script(file) { let self = plugins[file.path]; if (self) { if (self.onUnload) self.onUnload(); return self; } else self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUppe...
if (io.getRuntimeDirectories("plugins").some( function (dir) dir.contains(file, false))) plugins[self.NAME] = self;
if (io.getRuntimeDirectories("plugins").some( function (dir) dir.contains(file, false))) plugins[self.NAME] = self; } plugins.contexts[file.path] = self;
function Script(file) { let self = plugins[file.path]; if (self) { if (self.onUnload) self.onUnload(); return self; } else self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUppe...
if (self.onUnload)
if (set.has(self, "onUnload"))
function Script(file) { let self = set.has(plugins, file.path) && plugins[file.path]; if (self) { if (self.onUnload) self.onUnload(); } else { self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, f...
self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUpperCase()); self.PATH = file.path; self.CONTEXT = self;
self = update({ __proto__: plugins }, { NAME: file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, function (m, n1) n1.toUpperCase()), PATH: file.path, CONTEXT: self }); Class.replaceProperty(plugins, file.path, self);
function Script(file) { let self = set.has(plugins, file.path) && plugins[file.path]; if (self) { if (self.onUnload) self.onUnload(); } else { self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, f...
plugins[self.NAME] = self;
Class.replaceProperty(plugins, self.NAME, self);
function Script(file) { let self = set.has(plugins, file.path) && plugins[file.path]; if (self) { if (self.onUnload) self.onUnload(); } else { self = { __proto__: plugins }; plugins[file.path] = self; self.NAME = file.leafName.replace(/\..*/, "").replace(/-([a-z])/g, f...
Buffer.scrollToPercent(null, 100);
Buffer.scrollToPercent(null, null, 100);
scrollBottom: function () { Buffer.scrollToPercent(null, 100); },
Buffer.scrollToPercent(100, null);
Buffer.scrollToPercent(null, 100, null);
scrollEnd: function () { Buffer.scrollToPercent(100, null); },
Buffer.scrollToPercent(0, null);
Buffer.scrollToPercent(null, 0, null);
scrollStart: function () { Buffer.scrollToPercent(0, null); },
window.content.scrollTo(x, y);
content.scrollTo(x, y);
scrollTo: function (x, y) { marks.add("'", true); window.content.scrollTo(x, y); },
scrollTo: function(element) { element = $(element); var pos = element.cumulativeOffset(); window.scrollTo(pos[0], pos[1]); return element; },
var Prototype={Version:"1.6.1",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(...
scrollTo: function(element) { element = $(element); var pos = element.cumulativeOffset(); window.scrollTo(pos[0], pos[1]); return element; },
Buffer.scrollToPercent(null, 0);
Buffer.scrollToPercent(null, null, 0);
scrollTop: function () { Buffer.scrollToPercent(null, 0); },
Buffer.scrollToPercent(x, y);
Buffer.scrollToPercent(null, x, y);
scrollToPercent: function (x, y) { Buffer.scrollToPercent(x, y); },
} else if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) { this.reset();
search: function (word, reverse, private_) { this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (again) word = this.lastString; if (!this.matchCase) word = word.toLowerCase(); if (!aga...
for (let i in this.backward ? util.range(idx + 1, 0, -1) : util.range(idx, this.ranges.length))
if (this.backward) var groups = [util.range(idx + 1, 0, -1), util.range(this.ranges.length, idx, -1)]; else var groups = [util.range(idx, this.ranges.length), util.range(0, idx + 1)]; for (let i in groups[0])
search: function (word, reverse, private_) { if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) this.reset(); this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (ag...
if (private_) return; this.wrapped = true; this.lastRange = null; for (let i in this.backward ? util.range(this.ranges.length, idx, -1) : util.range(0, idx + 1)) yield i;
if (!private_) { this.wrapped = true; this.lastRange = null; for (let i in groups[1]) yield i; }
search: function (word, reverse, private_) { if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) this.reset(); this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (ag...
let start = this.sameDocument(this.lastRange, this.range.range) && this.range.intersects(this.lastRange) ? RangeFind.endpoint(this.lastRange, !(again ^ this.backward)) : RangeFind.endpoint(this.range.range, !this.backward);;
let start = RangeFind.sameDocument(this.lastRange, this.range.range) && this.range.intersects(this.lastRange) ? RangeFind.endpoint(this.lastRange, !(again ^ this.backward)) : RangeFind.endpoint(this.range.range, !this.backward);;
search: function (word, reverse, private_) { if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) this.reset(); this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (ag...
if (!private_) { this.range.descroll(); this.range.deselect(); }
search: function (word, reverse, private_) { if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) this.reset(); this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (ag...
if (private_) return range; this.lastString = word; if (range == null) { this.cancel(); this.found = false; return null;
if (!private_) { this.lastString = word; if (range == null) { this.cancel(); this.found = false; return null; } this.found = true;
search: function (word, reverse, private_) { if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) this.reset(); this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (ag...
this.range.selection.removeAllRanges(); this.range.selection.addRange(range); this.range.selectionController.scrollSelectionIntoView( this.range.selectionController.SELECTION_NORMAL, 0, false); this.found = true;
if (range && (!private_ || private_ < 0)) this.selectedRange = range;
search: function (word, reverse, private_) { if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) this.reset(); this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (ag...
if (!again && (word == "" || word.indexOf(this.lastString) != 0 || this.backward)) {
if (!again && (word === "" || word.indexOf(this.lastString) !== 0 || this.backward)) {
search: function (word, reverse, private_) { if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) this.reset(); this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (ag...
if (word == "")
if (word === "")
search: function (word, reverse, private_) { if (!private_ && this.lastRange && !RangeFind.equal(this.selectedRange, this.lastRange)) this.reset(); this.wrapped = false; this.finder.findBackwards = reverse ? !this.reverse : this.reverse; let again = word == null; if (ag...
item.url = decodeURIComponent(query.replace(/#.*/, "")); return item;
try { item.url = decodeURIComponent(query.replace(/#.*/, "")); return item; } catch (e) {}
completion.search = function search(context, noSuggest) { let [, keyword, space, args] = context.filter.match(/^\s*(\S*)(\s*)(.*)$/); let keywords = bookmarks.getKeywords(); let engines = bookmarks.getSearchEngines(); context.title = ["Search Keywords"]; co...
completion.search = function search(context, noSuggest) {
completion.search = function search(context, args, noSuggest) {
completion.search = function search(context, noSuggest) { let [, keyword, space, args] = context.filter.match(/^\s*(\S*)(\s*)(.*)$/); let keywords = bookmarks.getKeywords(); let engines = bookmarks.getSearchEngines(); context.title = ["Search Keywords"]; co...