_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 27 233k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q15300 | injectGhStars | train | async function injectGhStars () {
const opts = {}
if ('GITHUB_TOKEN' in process.env) {
opts.auth = process.env.GITHUB_TOKEN
}
const Octokit = require('@octokit/rest')
const octokit = new Octokit(opts)
let { headers, data } = await octokit.repos.get({
| javascript | {
"resource": ""
} |
q15301 | createEventTracker | train | function createEventTracker (emitter) {
const events = []
return {
on (event, fn) {
events.push([ event, fn ])
return emitter.on(event, fn)
},
| javascript | {
"resource": ""
} |
q15302 | findIndex | train | function findIndex (array, predicate) {
for (let i = 0; i < array.length; i++) {
| javascript | {
"resource": ""
} |
q15303 | findUppyInstances | train | function findUppyInstances () {
const instances = []
for (let i = 0; i < localStorage.length; i++) {
const key = localStorage.key(i)
if (/^uppyState:/.test(key)) {
| javascript | {
"resource": ""
} |
q15304 | openModal | train | function openModal () {
robodog.pick({
restrictions: {
allowedFileTypes: ['.png']
},
waitForEncoding: true,
params: {
auth: { key: TRANSLOADIT_KEY },
template_id: TEMPLATE_ID
},
providers: [
'webcam'
]
| javascript | {
"resource": ""
} |
q15305 | getUploadParameters | train | function getUploadParameters (req, res, next) {
// @ts-ignore The `uppy` property is added by middleware before reaching here.
const client = req.uppy.s3Client
const key = config.getKey(req, req.query.filename)
if (typeof key !== 'string') {
return res.status(500).json({ error: 's3: filename retur... | javascript | {
"resource": ""
} |
q15306 | createMultipartUpload | train | function createMultipartUpload (req, res, next) {
// @ts-ignore The `uppy` property is added by middleware before reaching here.
const client = req.uppy.s3Client
const key = config.getKey(req, req.body.filename)
const { type } = req.body
if (typeof key !== 'string') {
return res.status(500).js... | javascript | {
"resource": ""
} |
q15307 | getUploadedParts | train | function getUploadedParts (req, res, next) {
// @ts-ignore The `uppy` property is added by middleware before reaching here.
const client = req.uppy.s3Client
const { uploadId } = req.params
const { key } = req.query
if (typeof key !== 'string') {
return res.status(400).json({ error: 's3: the o... | javascript | {
"resource": ""
} |
q15308 | signPartUpload | train | function signPartUpload (req, res, next) {
// @ts-ignore The `uppy` property is added by middleware before reaching here.
const client = req.uppy.s3Client
const { uploadId, partNumber } = req.params
const { key } = req.query
if (typeof key !== 'string') {
return res.status(400).json({ error: ... | javascript | {
"resource": ""
} |
q15309 | abortMultipartUpload | train | function abortMultipartUpload (req, res, next) {
// @ts-ignore The `uppy` property is added by middleware before reaching here.
const client = req.uppy.s3Client
const { uploadId } = req.params
const { key } = req.query
if (typeof key !== 'string') {
return res.status(400).json({ error: 's3: t... | javascript | {
"resource": ""
} |
q15310 | completeMultipartUpload | train | function completeMultipartUpload (req, res, next) {
// @ts-ignore The `uppy` property is added by middleware before reaching here.
const client = req.uppy.s3Client
const { uploadId } = req.params
const { key } = req.query
const { parts } = req.body
if (typeof key !== 'string') {
return re... | javascript | {
"resource": ""
} |
q15311 | assertLoadedUrlEqual | train | function assertLoadedUrlEqual(controller, targetUrl) {
var locationBar = new elementslib.ID(controller.window.document, "urlbar");
var currentURL = locationBar.getNode().value;
// Load the target URL
controller.open(targetUrl);
controller.waitForPageLoad();
// Check the same web page has been | javascript | {
"resource": ""
} |
q15312 | closeContentAreaContextMenu | train | function closeContentAreaContextMenu(controller) {
var contextMenu = new elementslib.ID(controller.window.document, | javascript | {
"resource": ""
} |
q15313 | checkSearchField | train | function checkSearchField(controller, searchField,
searchTerm, submitButton,
timeout) {
controller.waitThenClick(searchField, timeout); | javascript | {
"resource": ""
} |
q15314 | createURI | train | function createURI(spec, originCharset, baseURI)
{
let iosvc = Cc["@mozilla.org/network/io-service;1"].
| javascript | {
"resource": ""
} |
q15315 | formatUrlPref | train | function formatUrlPref(prefName) {
var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
| javascript | {
"resource": ""
} |
q15316 | getDefaultHomepage | train | function getDefaultHomepage() {
var preferences = prefs.preferences;
var prefValue = preferences.getPref("browser.startup.homepage", "",
| javascript | {
"resource": ""
} |
q15317 | getEntity | train | function getEntity(urls, entityId) {
// Add xhtml11.dtd to prevent missing entity errors with XHTML files
urls.push("resource:///res/dtd/xhtml11.dtd");
// Build a string of external entities
var extEntities = "";
for (i = 0; i < urls.length; i++) {
extEntities += '<!ENTITY % dtd' + i + ' SYSTEM "' +
... | javascript | {
"resource": ""
} |
q15318 | getProperty | train | function getProperty(url, prefName) {
var sbs = Cc["@mozilla.org/intl/stringbundle;1"]
.getService(Ci.nsIStringBundleService);
var bundle = sbs.createBundle(url);
try {
return bundle.GetStringFromName(prefName);
| javascript | {
"resource": ""
} |
q15319 | handleWindow | train | function handleWindow(type, text, callback, dontClose) {
// Set the window opener function to use depending on the type
var func_ptr = null;
switch (type) {
case "type":
func_ptr = mozmill.utils.getWindowByType;
break;
case "title":
func_ptr = mozmill.utils.getWindowByTitle;
break;... | javascript | {
"resource": ""
} |
q15320 | createExecutor | train | function createExecutor(serverUrl) {
let client = serverUrl.then(url => new http.HttpClient(url));
let executor | javascript | {
"resource": ""
} |
q15321 | configureExecutor | train | function configureExecutor(executor) {
executor.defineCommand(
ExtensionCommand.GET_CONTEXT,
'GET',
'/session/:sessionId/moz/context');
executor.defineCommand(
ExtensionCommand.SET_CONTEXT,
'POST',
'/session/:sessionId/moz/context');
executor.defineCommand(
ExtensionCom... | javascript | {
"resource": ""
} |
q15322 | tabView_open | train | function tabView_open() {
var menuitem = new elementslib.Elem(this._controller.menus['view-menu'].menu_tabview);
this._controller.click(menuitem);
this.waitForOpened();
| javascript | {
"resource": ""
} |
q15323 | tabView_waitForOpened | train | function tabView_waitForOpened() {
// Add event listener to wait until the tabview has been opened
var self = { opened: false };
function checkOpened() { self.opened = true; }
this._controller.window.addEventListener("tabviewshown", checkOpened, false);
try {
mozmill.utils.waitFor(function() ... | javascript | {
"resource": ""
} |
q15324 | tabView_close | train | function tabView_close() {
var menuitem = new elementslib.Elem(this._controller.menus['view-menu'].menu_tabview);
| javascript | {
"resource": ""
} |
q15325 | tabView_waitForClosed | train | function tabView_waitForClosed() {
// Add event listener to wait until the tabview has been closed
var self = { closed: false };
function checkClosed() { self.closed = true; }
this._controller.window.addEventListener("tabviewhidden", checkClosed, false);
try {
mozmill.utils.waitFor(function()... | javascript | {
"resource": ""
} |
q15326 | tabView_getGroupTitleBox | train | function tabView_getGroupTitleBox(aSpec) {
var spec = aSpec || {};
var group = spec.group;
if (!group) {
throw new Error(arguments.callee.name + ": Group not specified.");
| javascript | {
"resource": ""
} |
q15327 | tabView_closeGroup | train | function tabView_closeGroup(aSpec) {
var spec = aSpec || {};
var group = spec.group;
if (!group) {
throw new Error(arguments.callee.name + ": Group not specified.");
}
var button = | javascript | {
"resource": ""
} |
q15328 | tabView_undoCloseGroup | train | function tabView_undoCloseGroup(aSpec) {
var spec = aSpec || {};
var group = spec.group;
if (!group) {
throw new Error(arguments.callee.name + ": Group not specified.");
}
var undo = | javascript | {
"resource": ""
} |
q15329 | tabView_waitForGroupUndo | train | function tabView_waitForGroupUndo(aSpec) {
var spec = aSpec || {};
var group = spec.group;
if (!group) {
throw new Error(arguments.callee.name + ": Group not specified.");
}
var element = null;
this._groupItemsObject.groupItems.forEach(function(node) {
if (node.container == group.g... | javascript | {
"resource": ""
} |
q15330 | tabView_closeTab | train | function tabView_closeTab(aSpec) {
var spec = aSpec || {};
var tab = spec.tab;
if (!tab) {
throw new Error(arguments.callee.name + ": Tab not specified.");
}
var button = | javascript | {
"resource": ""
} |
q15331 | tabView_getTabTitleBox | train | function tabView_getTabTitleBox(aSpec) {
var spec = aSpec || {};
var tab = spec.tab;
if (!tab) {
throw new Error(arguments.callee.name + ": Tab not specified.");
}
| javascript | {
"resource": ""
} |
q15332 | tabView_openTab | train | function tabView_openTab(aSpec) {
var spec = aSpec || {};
var group = spec.group;
if (!group) {
throw new Error(arguments.callee.name + ": Group not specified.");
}
var button = | javascript | {
"resource": ""
} |
q15333 | createNativeTouchList | train | function createNativeTouchList(touchListArgs) {
var touches = goog.array.map(touchListArgs, function(touchArg) {
return doc.createTouch(view, | javascript | {
"resource": ""
} |
q15334 | createGenericTouchList | train | function createGenericTouchList(touchListArgs) {
var touches = goog.array.map(touchListArgs, function(touchArg) {
// The target field is not part of the W3C spec, but both android and iOS
// add the target field to each touch.
return {
identifier: touchArg.identifier,
screenX: touc... | javascript | {
"resource": ""
} |
q15335 | train | function() {
/**
* Protobuf raw bytes stream parser
* @private {?JsonStreamParser}
*/
this.jsonStreamParser_ = null;
/**
* The current error message, if any.
* @private {?string}
*/
this.errorMessage_ = null;
/**
* The current position in the streamed data.
* @private {number}
*/
... | javascript | {
"resource": ""
} | |
q15336 | readMore | train | function readMore() {
while (pos < input.length) {
if (!utils.isJsonWhitespace(input[pos])) {
return true;
} | javascript | {
"resource": ""
} |
q15337 | mdObserver | train | function mdObserver(aOpener, aCallback) {
this._opener = aOpener;
this._callback = aCallback;
this._timer = | javascript | {
"resource": ""
} |
q15338 | mdObserver_findWindow | train | function mdObserver_findWindow() {
// If a window has been opened from content, it has to be unwrapped.
var window = domUtils.unwrapNode(mozmill.wm.getMostRecentWindow(''));
// Get the WebBrowserChrome and check if it's a modal window
var chrome = window.QueryInterface(Ci.nsIInterfaceRequestor).
... | javascript | {
"resource": ""
} |
q15339 | mdObserver_observe | train | function mdObserver_observe(aSubject, aTopic, aData) {
// Once the window has been found and loaded we can execute the callback
var window = this.findWindow();
if (window && ("documentLoaded" in window)) {
try {
this._callback(new mozmill.controller.MozMillController(window));
}
ca... | javascript | {
"resource": ""
} |
q15340 | modalDialog_start | train | function modalDialog_start(aCallback) {
if (!aCallback)
throw new Error(arguments.callee.name + ": Callback not specified.");
this._observer = new mdObserver(this._window, aCallback);
| javascript | {
"resource": ""
} |
q15341 | modalDialog_waitForDialog | train | function modalDialog_waitForDialog(aTimeout) {
var timeout = aTimeout || TIMEOUT_MODAL_DIALOG;
if (!this._observer) {
return;
}
try {
mozmill.utils.waitFor(function () {
return this.finished;
| javascript | {
"resource": ""
} |
q15342 | train | function(event, tagName) {
var element = Event.element(event);
while (element.parentNode && (!element.tagName ||
| javascript | {
"resource": ""
} | |
q15343 | train | function() {
this.deltaX = window.pageXOffset
|| document.documentElement.scrollLeft
|| document.body.scrollLeft
|| 0;
this.deltaY = window.pageYOffset
| javascript | {
"resource": ""
} | |
q15344 | train | function(mode, element) {
if (!mode) return 0;
if (mode == 'vertical')
return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
element.offsetHeight;
if (mode | javascript | {
"resource": ""
} | |
q15345 | UIArgument | train | function UIArgument(uiArgumentShorthand, localVars)
{
/**
* @param uiArgumentShorthand
*
* @throws UIArgumentException
*/
this.validate = function(uiArgumentShorthand)
{
var msg = "UIArgument validation error:\n"
+ print_r(uiArgumentShorthand);
// tr... | javascript | {
"resource": ""
} |
q15346 | UISpecifier | train | function UISpecifier(uiSpecifierStringOrPagesetName, elementName, args)
{
/**
* Initializes this object from a UI specifier string of the form:
*
* pagesetName::elementName(arg1=value1, arg2=value2, ...)
*
* into its component parts, and returns them as an object.
*
* @return ... | javascript | {
"resource": ""
} |
q15347 | UIMap | train | function UIMap()
{
// the singleton pattern, split into two parts so that "new" can still
// be used, in addition to "getInstance()"
UIMap.self = this;
// need to attach variables directly to the Editor object in order for them
// to be in scope for Editor methods
if (is_IDE()) {
Ed... | javascript | {
"resource": ""
} |
q15348 | downloadManager_cancelActiveDownloads | train | function downloadManager_cancelActiveDownloads() {
// Get a list of all active downloads (nsISimpleEnumerator)
var downloads = this._dms.activeDownloads;
| javascript | {
"resource": ""
} |
q15349 | downloadManager_cleanAll | train | function downloadManager_cleanAll(downloads) {
// Cancel any active downloads
this.cancelActiveDownloads();
// If no downloads have been specified retrieve the list from the database
if (downloads === undefined || downloads.length | javascript | {
"resource": ""
} |
q15350 | downloadManager_close | train | function downloadManager_close(force) {
var windowCount = mozmill.utils.getWindows().length;
if (this._controller) {
// Check if we should force the closing of the DM window
if (force) {
this._controller.window.close();
} else {
var cmdKey = utils.getEntity(this.getDtds(), "cm... | javascript | {
"resource": ""
} |
q15351 | downloadManager_deleteDownloadedFiles | train | function downloadManager_deleteDownloadedFiles(downloads) {
downloads.forEach(function(download) {
try {
var | javascript | {
"resource": ""
} |
q15352 | downloadManager_getAllDownloads | train | function downloadManager_getAllDownloads() {
var dbConn = this._dms.DBConnection;
var stmt = null;
if (dbConn.schemaVersion < 3)
return new Array();
// Run a SQL query and iterate through all results which have been found
var downloads = [];
stmt = dbConn.createStatement("SELECT * FROM m... | javascript | {
"resource": ""
} |
q15353 | downloadManager_open | train | function downloadManager_open(controller, shortcut) {
if (shortcut) {
if (mozmill.isLinux) {
var cmdKey = utils.getEntity(this.getDtds(), "downloadsUnix.commandkey");
controller.keypress(null, cmdKey, {ctrlKey: true, shiftKey: true});
} else {
var cmdKey = utils.getEntity(this.ge... | javascript | {
"resource": ""
} |
q15354 | downloadManager_waitForDownloadState | train | function downloadManager_waitForDownloadState(download, state, timeout) {
this._controller.waitForEval("subject.manager.getDownloadState(subject.download) == subject.state", timeout, 100,
| javascript | {
"resource": ""
} |
q15355 | train | function(controller, url) {
controller.open(url);
// Wait until the unknown content type dialog has been opened
controller.waitForEval("subject.getMostRecentWindow('').document.documentElement.id == 'unknownContentType'",
gTimeout, 100, mozmill.wm);
utils.handleWindow("type", "", func... | javascript | {
"resource": ""
} | |
q15356 | getLocalFileFromNativePathOrUrl | train | function getLocalFileFromNativePathOrUrl(aPathOrUrl) {
if (aPathOrUrl.substring(0,7) == "file://") {
// if this is a URL, get the file from that
let ioSvc = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
// XXX it's possible that using a null char-set here is bad... | javascript | {
"resource": ""
} |
q15357 | jsUnitFixTop | train | function jsUnitFixTop() {
var tempTop = top;
if (!tempTop) {
tempTop = window;
while (tempTop.parent) {
tempTop = tempTop.parent;
if (tempTop.top && tempTop.top.jsUnitTestSuite) {
tempTop = tempTop.top; | javascript | {
"resource": ""
} |
q15358 | formatHelpMsg | train | function formatHelpMsg(usage, options) {
var prog = path.basename(
process.argv[0]) + ' ' + path.basename(process.argv[1]);
var help = [
usage.replace(/\$0\b/g, prog),
'',
'Options:',
formatOption('help', 'Show this | javascript | {
"resource": ""
} |
q15359 | formatOption | train | function formatOption(name, helpMsg) {
var result = [];
var options = IDENTATION + '--' + name;
if (options.length > MAX_HELP_POSITION) {
result.push(options);
result.push('\n');
result.push(wrapStr(helpMsg, TOTAL_WIDTH,
repeatStr(' ', HELP_TEXT_POSITION)).join('\n'));
} else {
var spac... | javascript | {
"resource": ""
} |
q15360 | checkAccessKeysResults | train | function checkAccessKeysResults(controller, accessKeysSet) {
// Sort the access keys to have them in a A->Z order
var accessKeysList = accessKeysSet.sort();
// List of access keys
var aKeysList = [];
// List of values to identify the access keys
var valueList = [];
// List of rectangles of nodes contai... | javascript | {
"resource": ""
} |
q15361 | checkDimensions | train | function checkDimensions(child) {
if (!child.boxObject)
return [];
var childBox = child.boxObject;
var parent = childBox.parentBox;
// toplevel element or hidden elements, like script tags
if (!parent || parent == child.element || !parent.boxObject) {
return [];
}
var parentBox = parent.boxObject... | javascript | {
"resource": ""
} |
q15362 | filterAccessKeys | train | function filterAccessKeys(node) {
// Menus will need a separate filter set
var notAllowedLocalNames = ["menu", "menubar", "menupopup", "popupset"];
if (!node.disabled && !node.collapsed && !node.hidden &&
notAllowedLocalNames.indexOf(node.localName) == -1) {
// Code specific to the preferences panes to... | javascript | {
"resource": ""
} |
q15363 | filterCroppedNodes | train | function filterCroppedNodes(node) {
if (!node.boxObject) {
return domUtils.DOMWalker.FILTER_SKIP;
} else {
if (!node.disabled && !node.collapsed && !node.hidden) {
// Code specific to the preferences panes to reject out not visible nodes
// in the panes.
if (node.parentNode && (node.parent... | javascript | {
"resource": ""
} |
q15364 | processDimensionsResults | train | function processDimensionsResults(controller, boxes) {
if (boxes && boxes.length > 0) { | javascript | {
"resource": ""
} |
q15365 | _reportNode | train | function _reportNode(node) {
if (node.id) {
return "id: " + node.id;
} else if (node.label) {
return "label: " + node.label;
} else if (node.value) {
return "value: " + node.value;
} else if (node.hasAttributes()) {
var attrs = "node attributes: ";
for (var i = node.attributes.length - 1; i ... | javascript | {
"resource": ""
} |
q15366 | mapExec | train | function mapExec(array, func) {
for (var i = 0; i < array.length; ++i) {
| javascript | {
"resource": ""
} |
q15367 | mapExpr | train | function mapExpr(array, func) {
var ret = [];
for (var i = 0; i < array.length; ++i) {
| javascript | {
"resource": ""
} |
q15368 | reverseInplace | train | function reverseInplace(array) {
for (var i = 0; i < array.length / 2; ++i) {
var h = array[i];
var ii = array.length - | javascript | {
"resource": ""
} |
q15369 | copyArray | train | function copyArray(dst, src) {
if (!src) return;
var dstLength = dst.length;
for (var i = src.length | javascript | {
"resource": ""
} |
q15370 | copyArrayIgnoringAttributesWithoutValue | train | function copyArrayIgnoringAttributesWithoutValue(dst, src)
{
if (!src) return;
for (var i = src.length - 1; i >= 0; --i) {
// this test will pass so long as the attribute has a non-empty string
// | javascript | {
"resource": ""
} |
q15371 | xmlValue | train | function xmlValue(node, disallowBrowserSpecificOptimization) {
if (!node) {
return '';
}
var ret = '';
if (node.nodeType == DOM_TEXT_NODE ||
node.nodeType == DOM_CDATA_SECTION_NODE) {
ret += node.nodeValue;
} else if (node.nodeType == DOM_ATTRIBUTE_NODE) {
if (ajaxsltIsIE6) {
ret += ... | javascript | {
"resource": ""
} |
q15372 | xmlText | train | function xmlText(node, opt_cdata) {
var buf = [];
| javascript | {
"resource": ""
} |
q15373 | predicateExprHasPositionalSelector | train | function predicateExprHasPositionalSelector(expr, isRecursiveCall) {
if (!expr) {
return false;
}
if (!isRecursiveCall && exprReturnsNumberValue(expr)) {
// this is a "proximity position"-based predicate
return true;
}
if (expr instanceof FunctionCallExpr) {
var value = expr.name.value;
re... | javascript | {
"resource": ""
} |
q15374 | lookUpValueWithKeys | train | function lookUpValueWithKeys(keys) {
var key = goog.array.find(keys, | javascript | {
"resource": ""
} |
q15375 | createExecutor | train | function createExecutor(url) {
let agent = new http.Agent({ keepAlive: true });
let client = url.then(url => new http.HttpClient(url, agent));
let executor | javascript | {
"resource": ""
} |
q15376 | configureExecutor | train | function configureExecutor(executor) {
executor.defineCommand(
Command.LAUNCH_APP,
'POST',
'/session/:sessionId/chromium/launch_app');
executor.defineCommand(
Command.GET_NETWORK_CONDITIONS,
| javascript | {
"resource": ""
} |
q15377 | addonsManager_open | train | function addonsManager_open(aSpec) {
var spec = aSpec || { };
var type = (spec.type == undefined) ? "menu" : spec.type;
var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;
switch (type) {
case "menu":
var menuItem = new elementslib.Elem(this._controller.
... | javascript | {
"resource": ""
} |
q15378 | addonsManager_waitforOpened | train | function addonsManager_waitforOpened(aSpec) {
var spec = aSpec || { };
var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout;
// TODO: restore after 1.5.1 has landed
// var self = this;
//
// mozmill.utils.waitFor(function() { | javascript | {
"resource": ""
} |
q15379 | addonsManager_handleUtilsButton | train | function addonsManager_handleUtilsButton(aSpec) {
var spec = aSpec || { };
var item = spec.item;
if (!item)
throw new Error(arguments.callee.name + ": Menu item not specified.");
var button = this.getElement({type: "utilsButton"});
var menu = this.getElement({type: "utilsButton_menu"});
... | javascript | {
"resource": ""
} |
q15380 | addonsManager_enableAddon | train | function addonsManager_enableAddon(aSpec) {
var spec = aSpec || { };
spec.button = "enable";
| javascript | {
"resource": ""
} |
q15381 | addonsManager_disableAddon | train | function addonsManager_disableAddon(aSpec) {
var spec = aSpec || { };
spec.button = "disable";
| javascript | {
"resource": ""
} |
q15382 | addonsManager_installAddon | train | function addonsManager_installAddon(aSpec) {
var spec = aSpec || { };
var addon = spec.addon;
var timeout = spec.timeout;
var button = "install";
var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;
var button = this.getAddonButton({addon: | javascript | {
"resource": ""
} |
q15383 | addonsManager_removeAddon | train | function addonsManager_removeAddon(aSpec) {
var spec = aSpec || { };
spec.button = "remove";
| javascript | {
"resource": ""
} |
q15384 | addonsManager_undo | train | function addonsManager_undo(aSpec) {
var spec = aSpec || { };
spec.link = "undo";
| javascript | {
"resource": ""
} |
q15385 | addonsManager_addons | train | function addonsManager_addons(aSpec) {
var spec = aSpec || {};
return this.getElements({
type: "addons",
subtype: spec.attribute,
| javascript | {
"resource": ""
} |
q15386 | addonsManager_getAddonButton | train | function addonsManager_getAddonButton(aSpec) {
var spec = aSpec || { };
var addon = spec.addon;
var button = spec.button;
if (!button)
throw new Error(arguments.callee.name + ": | javascript | {
"resource": ""
} |
q15387 | addonsManager_getAddonLink | train | function addonsManager_getAddonLink(aSpec) {
var spec = aSpec || { };
var addon = spec.addon;
var link = spec.link;
if (!link)
throw new Error(arguments.callee.name + ": | javascript | {
"resource": ""
} |
q15388 | addonsManager_getAddonRadiogroup | train | function addonsManager_getAddonRadiogroup(aSpec) {
var spec = aSpec || { };
var addon = spec.addon;
var radiogroup = spec.radiogroup;
if (!radiogroup)
throw new Error(arguments.callee.name + ": | javascript | {
"resource": ""
} |
q15389 | addonsManager_getAddonChildElement | train | function addonsManager_getAddonChildElement(aSpec) {
var spec = aSpec || { };
var addon = spec.addon;
var attribute = spec.attribute;
var value = spec.value;
var type = spec.type;
if (!addon)
throw new Error(arguments.callee.name + ": Add-on not specified.");
// If no type has been s... | javascript | {
"resource": ""
} |
q15390 | addonsManager_waitForDownloaded | train | function addonsManager_waitForDownloaded(aSpec) {
var spec = aSpec || { };
var addon = spec.addon;
var timeout = (spec.timeout == undefined) ? TIMEOUT_DOWNLOAD : spec.timeout;
if (!addon)
throw new Error(arguments.callee.name + ": Add-on not specified.");
var self = this;
var node = addo... | javascript | {
"resource": ""
} |
q15391 | addonsManager_categories | train | function addonsManager_categories(aSpec) {
var spec = aSpec || { };
var categories = this.getElements({
type: "categories",
subtype: spec.attribute,
value: spec.value
});
if (categories.length == 0)
| javascript | {
"resource": ""
} |
q15392 | addonsManager_getCategoryById | train | function addonsManager_getCategoryById(aSpec) {
var spec = aSpec || { };
var id = spec.id;
if (!id)
| javascript | {
"resource": ""
} |
q15393 | addonsManager_getCategoryId | train | function addonsManager_getCategoryId(aSpec) {
var spec = aSpec || { };
var category = spec.category;
| javascript | {
"resource": ""
} |
q15394 | addonsManager_setCategory | train | function addonsManager_setCategory(aSpec) {
var spec = aSpec || { };
var category = spec.category;
var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;
if (!category)
throw | javascript | {
"resource": ""
} |
q15395 | addonsManager_setCategoryById | train | function addonsManager_setCategoryById(aSpec) {
var spec = aSpec || { };
var id = spec.id;
var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;
if (!id)
throw new Error(arguments.callee.name + ": | javascript | {
"resource": ""
} |
q15396 | addonsManager_waitForCategory | train | function addonsManager_waitForCategory(aSpec) {
var spec = aSpec || { };
var category = spec.category;
var timeout = (spec.timeout == undefined) ? TIMEOUT : spec.timeout;
if (!category)
throw new Error(arguments.callee.name + ": Category not specified.");
// TODO: restore after 1.5.1 has lan... | javascript | {
"resource": ""
} |
q15397 | addonsManager_search | train | function addonsManager_search(aSpec) {
var spec = aSpec || { };
var value = spec.value;
var timeout = (spec.timeout == undefined) ? TIMEOUT_SEARCH : spec.timeout;
var waitFor = (spec.waitFor == undefined) ? true : spec.waitFor;
if (!value)
throw new Error(arguments.callee.name + ": Search ter... | javascript | {
"resource": ""
} |
q15398 | addonsManager_getSearchFilter | train | function addonsManager_getSearchFilter(aSpec) {
var spec = aSpec || { };
return this.getElements({
type: "search_filterRadioButtons", | javascript | {
"resource": ""
} |
q15399 | addonsManager_getSearchFilterByValue | train | function addonsManager_getSearchFilterByValue(aValue) {
if (!aValue)
throw new Error(arguments.callee.name + ": Search filter value not specified.");
return this.getElement({
| javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.