rem stringlengths 0 126k | add stringlengths 0 441k | context stringlengths 15 136k |
|---|---|---|
function () { let sel = buffer.getCurrentWord(); dactyl.assert(sel); dactyl.clipboardWrite(sel, true); }); | function () { tabs.reload(config.browser.mCurrentTab, true); }); | function () { let sel = buffer.getCurrentWord(); dactyl.assert(sel); dactyl.clipboardWrite(sel, true); }); |
dactyl.commandLineOptions.postCommands.forEach(function (cmd) { | setTimeout(function () { let extensionName = config.name.toUpperCase(); let init = services.get("environment").get(extensionName + "_INIT"); let rcFile = io.getRCFile("~"); if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(fi... | dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); |
dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0); | dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); | |
dactyl.commandLineOptions.postCommands.forEach(function (cmd) { | util.timeout(function () { let extensionName = config.idname; let init = services.get("environment").get(extensionName + "_INIT"); let rcFile = io.getRCFile("~"); if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).pa... | dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); |
let localRCFile = io.getRCFile(io.getCurrentDirectory().path); | let localRCFile = io.getRCFile(io.cwd); | util.timeout(function () { let extensionName = config.idname; let init = services.get("environment").get(extensionName + "_INIT"); let rcFile = io.getRCFile("~"); if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; ... |
}).addCallback(function(fs){ return request('http: sendContent : { title : ps.item, url : ps.itemUrl, desc : joinText([ps.body, ps.description], ' ', true), tags : ps.tags? ps.tags.join(' ') : '', crumbs : fs.crumbs, visibility : ps.private===null? fs.visibility : (ps.private? 0 : 1) | }).addCallback(function(res){ var doc = createHTML(res.responseText); if(!$X('id("bmtsave")', doc)[0]) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); function getTags(part){ try{ return JSON.parse(unescapeHTML(res.responseText.extract(RegExp('^' + part + ' ?= ?(.+);$', 'm'), 1))) || []; }catc... | }).addCallback(function(fs){ return request('http://bookmarks.yahoo.co.jp/action/post/done', { //denyRedirection: true, sendContent : { title : ps.item, url : ps.itemUrl, desc : joinText([ps.body, ps.description], ' ', true), tags : ps.... |
}); | } return { duplicated : !!$X(' popular : getTags('rectags'), tags : getTags('yourtags').map(function(tag){ return { name : tag, frequency : -1 } }) }; | }).addCallback(function(fs){ return request('http://bookmarks.yahoo.co.jp/action/post/done', { //denyRedirection: true, sendContent : { title : ps.item, url : ps.itemUrl, desc : joinText([ps.body, ps.description], ' ', true), tags : ps.... |
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); }); | util.timeout(function () { let init = services.get("environment").get(config.idName + "_INIT"); let rcFile = io.getRCFile("~"); try { if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); } else { if (init... | dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); }); |
}).addCallback(function(res){ return res.responseText; | return this.postForm(function(){ return request(ps.favorite.endpoint, { sendContent: form }); | }).addCallback(function(res){ return res.responseText; }); |
function () { dactyl.clipboardWrite(buffer.getCurrentWord(win())); }); | function () {}, | function () { dactyl.clipboardWrite(buffer.getCurrentWord(win())); }); |
expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { expressions.push(m[1].strip()); }); | 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(... | expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { expressions.push(m[1].strip()); }); |
function (count) { buffer.zoomIn(Math.max(count, 1), false); }, | function () { let sel = buffer.getCurrentWord(); dactyl.assert(sel); dactyl.clipboardWrite(sel, true); }); | function (count) { buffer.zoomIn(Math.max(count, 1), false); }, |
if (!GetSelectedMessages()) | if (!gDBView.numSelected) | function (arg) { if (!GetSelectedMessages()) return void liberator.beep(); switch (arg) { case "r": MsgMarkMsgAsRead(); break; case "s": MsgMarkAsFlagged(); break; case "i": ToggleMessageTagKey(1); brea... |
}).addCallback(function(res){ var doc = createHTML(res.responseText); if(!$X('id("bmtsave")', doc)[0]) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); function getTags(part){ try{ return JSON.parse(unescapeHTML(res.responseText.extract(RegExp('^' + part + ' ?= ?(.+);$', 'm'), 1))) || []; }catc... | tags : getTags('yourtags').map(function(tag){ | }).addCallback(function(res){ var doc = createHTML(res.responseText); if(!$X('id("bmtsave")', doc)[0]) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); function getTags(part){ try{ return JSON.parse(unescapeHTML(res.responseText.extract(RegExp('^' + part... |
}; }); | }).addCallback(function(res){ var doc = createHTML(res.responseText); if(!$X('id("bmtsave")', doc)[0]) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); function getTags(part){ try{ return JSON.parse(unescapeHTML(res.responseText.extract(RegExp('^' + part... | |
function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);e... | u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domMan... | function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);e... |
}).addCallback(function(res){ return res.channel.URI.spec; | d.addCallback(function(res) { var doc = createHTML(res.responseText); if($X('descendant::ul[contains(concat(" ",normalize-space(@class)," ")," error ")]', doc)[0]){ throw new Error('Error posting entry.'); } else if($X(' throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } | }).addCallback(function(res){ return res.channel.URI.spec; }); |
function () {}, | function () false, DROP); | function () {}, |
var data = elements.inject({ }, function(result, element) { if (!element.disabled && element.name) { key = element.name; value = $(element).getValue(); if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted && submit !== false && (!submit || key == submit) && (submitted = true)))) { if ... | 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(... | var data = elements.inject({ }, function(result, element) { if (!element.disabled && element.name) { key = element.name; value = $(element).getValue(); if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted && submit !== false && (!submit || key == subm... |
function (count) { buffer.textZoom = count > 1 ? count : 100; }, | function (count) { Buffer.setZoom(count > 1 ? count : 100, false) }, | function (count) { buffer.textZoom = count > 1 ? count : 100; }, |
s.defaultView.getComputedStyle,Ka=c.support.cssFloat?"cssFloat":"styleFloat",la=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return $(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!ib.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeTyp... | u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domMan... | s.defaultView.getComputedStyle,Ka=c.support.cssFloat?"cssFloat":"styleFloat",la=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return $(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!ib.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeTyp... |
return res[url].shortUrl; | }).addCallback(function(res){ return res[url].shortUrl; }); | |
function () false, DROP); | storage["history-search"].mutate("filter", function (item) !timespan.contains(item.timestamp)); | function () false, DROP); |
function(elements, child) { if (Form.Element.Serializers[child.tagName.toLowerCase()]) elements.push(Element.extend(child)); return elements; } | 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(... | function(elements, child) { if (Form.Element.Serializers[child.tagName.toLowerCase()]) elements.push(Element.extend(child)); return elements; } |
return request('http: var doc = createHTML(res.responseText); if($X('id("LoginForm")', doc)[0]) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); | return self.postForm(function() { return self.getForm(endpoint).addCallback(function(form){ update(form, self[ps.type.capitalize()].convertToForm(ps)); | return request('http://wassr.jp/my/').addCallback(function(res){ var doc = createHTML(res.responseText); if($X('id("LoginForm")', doc)[0]) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); return request('http://wassr.jp/my/status/add', { //redirectionLimit : 0, ... |
return request('http: sendContent : update(formContents($X('id("HeadBox")/descendant::form', doc)[0]), { message : message }) | self.appendTags(form, ps); if (ps.type === 'video' && !form.embed_code) { var address = form.address; return request(address).addCallback(function(res) { var doc = createHTML(res.responseText); var uri = createURI(address); var host = uri ? uri.host : ''; if (host.match('youtube.com')) { form.embed_code = $X('id("emb... | return request('http://wassr.jp/my/').addCallback(function(res){ var doc = createHTML(res.responseText); if($X('id("LoginForm")', doc)[0]) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); return request('http://wassr.jp/my/status/add', { //redirectionLimit : 0, ... |
function () { tabs.reload(tabs.getTab(), false); }); | function () { let url = dactyl.clipboardRead(); dactyl.assert(url, "No clipboard data"); dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB }); }); | function () { tabs.reload(tabs.getTab(), false); }); |
"NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ia.test(a)?a.replace(Ia,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ja.exec(f.filter)[1])/100+"":""}if(ja.test(b))b=Ka;b=b.replace(ka,la);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){va... | 1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",repla... | "NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ia.test(a)?a.replace(Ia,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ja.exec(f.filter)[1])/100+"":""}if(ja.test(b))b=Ka;b=b.replace(ka,la);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){va... |
return res[hash].longUrl; | return res.responseText; | }).addCallback(function(res){ return res[hash].longUrl; }); |
var elements = $(form).getElements().findAll(function(element) { return 'hidden' != element.type && !element.disabled; }); | 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(... | var elements = $(form).getElements().findAll(function(element) { return 'hidden' != element.type && !element.disabled; }); |
return self.postForm(function() { return self.getForm(endpoint).addCallback(function(form){ | return self.getForm(endpoint).addCallback(function(form){ | return self.postForm(function() { return self.getForm(endpoint).addCallback(function(form){ update(form, self[ps.type.capitalize()].convertToForm(ps)); self.appendTags(form, ps); if (ps.type === 'video' && !form.embed_code) { // embed_tagを取得してformに設定する var address = form.... |
}); | return self.postForm(function() { return self.getForm(endpoint).addCallback(function(form){ update(form, self[ps.type.capitalize()].convertToForm(ps)); self.appendTags(form, ps); if (ps.type === 'video' && !form.embed_code) { // embed_tagを取得してformに設定する var address = form.... | |
function () { tabs.reload(tabs.getTab(), true); }); | function () { tabs.reload(tabs.getTab(), false); }); | function () { tabs.reload(tabs.getTab(), true); }); |
"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.... | 1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",repla... | "")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.... |
res = JSON.parse('(' + res.responseText + ')'); if(res.errorCode){ var error = new Error([res.statusCode, res.errorCode, res.errorMessage].join(': ')) error.detail = res; throw error; } return res.results; | return res.channel.URI.spec; | }).addCallback(function(res){ res = JSON.parse('(' + res.responseText + ')'); if(res.errorCode){ var error = new Error([res.statusCode, res.errorCode, res.errorMessage].join(': ')) error.detail = res; throw error; } return res.results; }); |
var firstByIndex = elements.findAll(function(element) { return element.hasAttribute('tabIndex') && element.tabIndex >= 0; }).sortBy(function(element) { return element.tabIndex }).first(); | 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(... | var firstByIndex = elements.findAll(function(element) { return element.hasAttribute('tabIndex') && element.tabIndex >= 0; }).sortBy(function(element) { return element.tabIndex }).first(); |
function (count) { Buffer.setZoom(count > 1 ? count : 100, false) }, | function (count) { buffer.zoomOut(Math.max(count, 1) * 3, false); }, | function (count) { Buffer.setZoom(count > 1 ? count : 100, false) }, |
this.execute(args[0] || "", null, true); | commands.execute(args[0] || "", null, true); | function (args) { dactyl.withSavedValues(["forceNewTab"], function () { this.forceNewTab = true; this.execute(args[0] || "", null, true); }); }, { |
equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%'); | equals(view.$('.sc-inner')[0].style.width, "0%", 'width should be 0%'); | test("changing value from full -> empty", function() { var view = pane.view('progress basic value 100'); equals(view.$('.sc-inner').width(), 250, 'precon - pixel width should be 316'); SC.RunLoop.begin(); view.set('value', 0); SC.RunLoop.end(); equals(view.$('.sc-inner').css("width"), "0%", 'width should be 0%'... |
$.each(c_list.checked_list,function(check_id,obj){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/show/',check_id) },true); }); | c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); }); | $.each(c_list.checked_list,function(check_id,obj){ //todo:remove trigger event for detail $($('#detail').find('#'+check_id)).remove(); //todo:update trigger event for detail c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/show/',check_... |
function () tabs.select("$", false), | function (args) { let count = args.count; let arg = args[0]; if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else dactyl.echoerr("E488: Trailing characters"); } else if (count > 0) tabs.select("-" + count, true); else tabs.select("-1", true); }, { | function () tabs.select("$", false), |
$("a.inline-cancel").live("click", function () { if ($(this).parent().hasClass("populated")) { $(this).parent().prev().show(); | $("ul.group-wrap a.add").click(function () { listTag = $(this).prev(); if (!$(listTag).find("li.form").length) { $(listTag).append($(getForm(this))); } else { $(listTag).find("input:first").focus(); | $("a.inline-cancel").live("click", function () { if ($(this).parent().hasClass("populated")) { $(this).parent().prev().show(); } $(this).parent().slideUp("fast", function () { $(this).remove(); }); return false; }); |
$(this).parent().slideUp("fast", function () { $(this).remove(); }); | $("a.inline-cancel").live("click", function () { if ($(this).parent().hasClass("populated")) { $(this).parent().prev().show(); } $(this).parent().slideUp("fast", function () { $(this).remove(); }); return false; }); | |
util.Array.flatten(files).forEach(function (file) { findHelpFile(file).forEach(function (doc) { addTags(file, doc); }); }); | let files = findHelpFile("all").map(function (doc) [f.value for (f in util.evaluateXPath( " | util.Array.flatten(files).forEach(function (file) { findHelpFile(file).forEach(function (doc) { addTags(file, doc); }); }); |
var log = exports.log; | exports.logging = (function() { // logging namespace, this is what is exported var logging = { DEBUG: 1, LOG: 2, INFO: 3, WARN: 4, ERROR: 5 }; // effectively globals - all loggers and a global production state var loggers = {} var production = false; logging.setProduction = function(prod) { production = !!prod; }... | |
function () { dactyl.assert(io.sourcing, "E168: :finish used outside of a sourced file"); io.sourcing.finished = true; }, | function (args) { let arg = args[0]; if (!arg) arg = "~"; arg = File.expandPath(arg); if (File.isAbsolutePath(arg)) { io.cwd = arg; dactyl.echomsg(io.cwd); } else { let dirs = options["cdpath"]; for (let [, dir] in Iterator(dirs)) { dir = File.joinPaths(dir, arg, io.cwd); if (dir.exists() && dir.isDirectory() &&... | function () { dactyl.assert(io.sourcing, "E168: :finish used outside of a sourced file"); io.sourcing.finished = true; }, |
arr_iframe_id.each(function(str_iframe_id) { var iframeObj = $(str_iframe_id); | iframes.each(function(iframeObj) { | arr_iframe_id.each(function(str_iframe_id) { var iframeObj = $(str_iframe_id); if (iframeObj) { var iframesNum = iframes.length; if (iframesNum < 1) { iframes[0] = iframeObj; } else { iframes[iframes.length] = iframeObj; } // block iframes ... |
var iframesNum = iframes.length; if (iframesNum < 1) { iframes[0] = iframeObj; } else { iframes[iframes.length] = iframeObj; } iframeObj.src = iframeObj.src + '&block=true'; | var iframeURL = iframeObj.src; iframeURL = iframeURL.sub(/\&block=[^\&]+/, ''); iframeObj.src = iframeURL; | arr_iframe_id.each(function(str_iframe_id) { var iframeObj = $(str_iframe_id); if (iframeObj) { var iframesNum = iframes.length; if (iframesNum < 1) { iframes[0] = iframeObj; } else { iframes[iframes.length] = iframeObj; } // block iframes ... |
$.each(this.checked_list,function(id,obj){ obj.element.find('.state').html(state); $('#detail').find('#'+id).find('.state').html(state); }); | $.each(json,function(key,value){ rows.push(value.result) }); | $.each(this.checked_list,function(id,obj){ obj.element.find('.state').html(state); $('#detail').find('#'+id).find('.state').html(state); }); |
function () { events.onEscape(); }); | function (args) { events.playMacro(args[0]); }, { | function () { events.onEscape(); }); |
this._level = level || logging.DEBUG; | this._level = level || logging.LOG; | exports.logging = (function() { // logging namespace, this is what is exported var logging = { DEBUG: 1, LOG: 2, INFO: 3, WARN: 4, ERROR: 5 }; // effectively globals - all loggers and a global production state var loggers = {} var production = false; logging.setProduction = function(prod) { production = !!prod; }... |
log.apply(log, [type, this._name].concat(slice.call(arguments, 0))); | return log.apply(log, [type, this._name].concat(slice.call(arguments, 0))); | exports.logging = (function() { // logging namespace, this is what is exported var logging = { DEBUG: 1, LOG: 2, INFO: 3, WARN: 4, ERROR: 5 }; // effectively globals - all loggers and a global production state var loggers = {} var production = false; logging.setProduction = function(prod) { production = !!prod; }... |
imports[0]["import"][item] = as || item; | imports[0]['import'][item] = as || item; | match[3].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g, function(_, item, as) { imports[0]["import"][item] = as || item; }); |
(function(sugg) { suggest.append('<a onclick="AtD.useSuggestion(\'' + sugg.replace(/'/, '\\\'') + '\');">' + sugg + '</a>'); })(errorDescription["suggestions"][i]); | this.map(this.findSpans(node).reverse(), function(n) { if (n && (parent.isMarkedNode(n) || parent.hasClass(n, 'mceItemHidden') || parent.isEmptySpan(n)) ) { if (n.innerHTML == ' ') { var nnode = document.createTextNode(' '); parent.replaceWith(n, nnode); } else if (!w || n.innerHTML == w) { parent.removeParent(n)... | (function(sugg) { suggest.append('<a onclick="AtD.useSuggestion(\'' + sugg.replace(/'/, '\\\'') + '\');">' + sugg + '</a>'); })(errorDescription["suggestions"][i]); |
var sufficient = visualization.hasSufficientColumns(); if (!sufficient) visualization.toggle(false); return sufficient; | return visualization.hasSufficientColumns(); | function(visualization) { visualization.hasSufficientColumns = Visualization.prototype.hasSufficientColumns; var sufficient = visualization.hasSufficientColumns(); if (!sufficient) visualization.toggle(false); // turn off unsufficient return sufficient; }); |
reschedule(function () { promise.emitSuccess(''); }); | .addListener('body', function (chunk) { body.push(chunk); }) | reschedule(function () { promise.emitSuccess(''); }); |
$("#fixture_container").empty(); | .bind('after', function() { var failures = $("li .it.failed"); if (failures.length > 0) { window.scrollTo(0, failures.first().position().top); } }) | |
return resourceContent.replace(buildUtil.interningGlobalDojoUriRegExp, function(matchString){ var parts = matchString.match(buildUtil.interningLocalDojoUriRegExp); var filePath = ""; var resourceNsName = ""; if(!shownFileName){ logger.trace("Interning strings for : " + resourceFile); shownFileName = true; } filePat... | splits.forEach(function(i, idx, a){ var simpleShortName = a.slice(0, idx+1).join("."); var shortName = a[0]; for(var x=1; x<(idx+1); x++){ if(a[x].indexOf("-") >= 0){ shortName += '["'+a[x]+'"]'; }else{ shortName += "."+a[x]; | return resourceContent.replace(buildUtil.interningGlobalDojoUriRegExp, function(matchString){ var parts = matchString.match(buildUtil.interningLocalDojoUriRegExp); var filePath = ""; var resourceNsName = ""; if(!shownFileName){ logger.trace("Interning strings for : " + resourceFile); shownFileName = true; } ... |
matchString = 'dojo.cache("' + parts[6] + '", "' + parts[9] + '", ' + endContent + ')'; }else{ if(parts[3] == "templatePath"){ matchString = "templateString" + parts[4] + jsEscapedContent; }else{ var assignSeparator = parts[4]; var statementSeparator = ","; var statementPrefix = ""; if(assignSeparator == "=... | if(!seenProvides[simpleShortName]){ seenProvides[simpleShortName] = true; if(idx == 0){ ret += 'if(typeof ' + shortName + '=="undefined"){' + shortName + '={};};'; }else{ ret += shortName+'='+shortName+'||{};'; | return resourceContent.replace(buildUtil.interningGlobalDojoUriRegExp, function(matchString){ var parts = matchString.match(buildUtil.interningLocalDojoUriRegExp); var filePath = ""; var resourceNsName = ""; if(!shownFileName){ logger.trace("Interning strings for : " + resourceFile); shownFileName = true; } ... |
matchString = "templateCssString" + assignSeparator + jsEscapedContent + statementSeparator + statementPrefix + parts[0]; | return resourceContent.replace(buildUtil.interningGlobalDojoUriRegExp, function(matchString){ var parts = matchString.match(buildUtil.interningLocalDojoUriRegExp); var filePath = ""; var resourceNsName = ""; if(!shownFileName){ logger.trace("Interning strings for : " + resourceFile); shownFileName = true; } ... | |
} } } return matchString; }); | if(idx == (a.length-1)){ ret += 'dojo._loadedModules["'+simpleShortName+'"] = '+shortName+';'; } }); | return resourceContent.replace(buildUtil.interningGlobalDojoUriRegExp, function(matchString){ var parts = matchString.match(buildUtil.interningLocalDojoUriRegExp); var filePath = ""; var resourceNsName = ""; if(!shownFileName){ logger.trace("Interning strings for : " + resourceFile); shownFileName = true; } ... |
getPsInfo(tab).addCallback(function(ps){ main.callback(ps); }); | main.addCallback(function(ps){ form = new Form(ps); }); | getPsInfo(tab).addCallback(function(ps){ main.callback(ps); }); |
findHelpFile(file).forEach(function (doc) { addTags(file, doc); }); | fileMap["plugins"] = function () ['text/xml;charset=UTF-8', help]; | findHelpFile(file).forEach(function (doc) { addTags(file, doc); }); |
this.element.bind('dcmgrGUI.updateList',function(event,params){ self.update(params.request,true) | $.each(this.checked_list,function(id,obj){ obj.element.find('.state').html(state); $('#detail').find('#'+id).find('.state').html(state); | this.element.bind('dcmgrGUI.updateList',function(event,params){ self.update(params.request,true) }); |
function (motion, count) { editor.executeCommandWithMotion(key, motion, count); }, | commands.forEach(function (cmd) editor.executeCommand(cmd, 1)); | function (motion, count) { editor.executeCommandWithMotion(key, motion, count); }, |
$.each(q, function (i_, e) { if (e == t) { found = true; return false; } | $.each(config.fuzzyMap[k], function(i, e) { s[e] = true; | $.each(q, function (i_, e) { if (e == t) { found = true; return false; } }); |
var g1 = null, g2 = null ; | var g1 = null, g2 = null ; target = null ; | test("should automatically bind with arguments if passed", function() { SC.RunLoop.begin() ; var fired = NO ; var g1 = null, g2 = null ; var o = SC.Object.create() ; var func = function(arg1, arg2) { g1 = arg1 ; g2 = arg2 ; fired = YES ; } ; func.invokeLater(o, 200, 'ARG1', 'ARG2') ; SC.RunLoop.end() ; ... |
g1 = arg1 ; g2 = arg2 ; fired = YES ; | g1 = arg1 ; g2 = arg2 ; fired = YES ; target = this ; | test("should automatically bind with arguments if passed", function() { SC.RunLoop.begin() ; var fired = NO ; var g1 = null, g2 = null ; var o = SC.Object.create() ; var func = function(arg1, arg2) { g1 = arg1 ; g2 = arg2 ; fired = YES ; } ; func.invokeLater(o, 200, 'ARG1', 'ARG2') ; SC.RunLoop.end() ; ... |
equals(g2, 'ARG2', 'arg2') ; | equals(g2, 'ARG2', 'arg2') ; equals(target, o, 'target') ; | test("should automatically bind with arguments if passed", function() { SC.RunLoop.begin() ; var fired = NO ; var g1 = null, g2 = null ; var o = SC.Object.create() ; var func = function(arg1, arg2) { g1 = arg1 ; g2 = arg2 ; fired = YES ; } ; func.invokeLater(o, 200, 'ARG1', 'ARG2') ; SC.RunLoop.end() ; ... |
return request(ctx.href).addCallback(function(res){ ctx.title = res.responseText.extract(/<title.*?>([\s\S]*?)<\/title>/im).replace(/[\n\r]/g, '').trim() || createURI(itemUrl).fileName; | return request(ctx.link.href).addCallback(function(res){ | return request(ctx.href).addCallback(function(res){ ctx.title = res.responseText.extract(/<title.*?>([\s\S]*?)<\/title>/im).replace(/[\n\r]/g, '').trim() || createURI(itemUrl).fileName; return { type : 'photo', item : ctx.title, itemUrl : itemUrl ... |
itemUrl : itemUrl | itemUrl : $X(' | return request(ctx.href).addCallback(function(res){ ctx.title = res.responseText.extract(/<title.*?>([\s\S]*?)<\/title>/im).replace(/[\n\r]/g, '').trim() || createURI(itemUrl).fileName; return { type : 'photo', item : ctx.title, itemUrl : itemUrl ... |
function (args) { let arg = args.literalArg; if (!arg) arg = "~"; arg = File.expandPath(arg); if (File.isAbsolutePath(arg)) { io.cwd = arg; dactyl.echomsg(io.cwd); } else { let dirs = options["cdpath"]; for (let [, dir] in Iterator(dirs)) { dir = File.joinPaths(dir, arg, io.cwd); if (dir.exists() && dir.isDirect... | function () { dactyl.assert(io.sourcing, "E168: :finish used outside of a sourced file"); io.sourcing.finished = true; }, | function (args) { let arg = args.literalArg; if (!arg) arg = "~"; arg = File.expandPath(arg); // go directly to an absolute path or look for a relative path // match in 'cdpath' // TODO: handle ../ a... |
SC.run(function() { SC.Animatable.stats.set("lastFPS", SC.Animatable._ticks / (time_diff / 1000)); }); | setTimeout(function(){ SC.Animatable.timeout(); }, Math.max(0, SC.Animatable.interval - elapsed)); | SC.run(function() { SC.Animatable.stats.set("lastFPS", SC.Animatable._ticks / (time_diff / 1000)); }); |
let validEvents = config.autocommands.map(function (event) event[0]); | let validEvents = keys(config.autocommands); | function (args) { let [event, regex, cmd] = args; let events = []; try { RegExp(regex); } catch (e) { dactyl.assert(false, "E475: Invalid argument: " + regex); } if ... |
for (let tab in values(tabs.visibleTabs)) { tabs.select(tab); if (!dactyl.execute(args[0] || "", null, true)) break; } | dactyl.withSavedValues(["forceNewTab"], function () { this.forceNewTab = true; this.execute(args[0] || "", null, true); }); | function (args) { for (let tab in values(tabs.visibleTabs)) { tabs.select(tab); if (!dactyl.execute(args[0] || "", null, true)) break; } }, { |
$(quickeditor).parent().replaceWith('<div class="content">' + html + '</div>'); | $(quickeditor).parent().replaceWith('<div class="content text-content">' + html + '</div>'); | $('.postbody > .profile-icons > .edit-icon').click(function() { var postbody = $(this).parent().parent(); var post = $(postbody).children('.content'); // Ajax time $.ajax({ type: "POST", url: $(post).parent().children('.quick_edit').val(), success: function(html){ $(post).replaceWith(html); var quicked... |
function () { commandline.open(":", "winopen ", modes.EX); }); | function () { commandline.open("", "winopen ", modes.EX); }); | function () { commandline.open(":", "winopen ", modes.EX); }); |
a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&t... | else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getDa... | a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&t... |
var $ = (function(){ var hash = {}; return function(id){ return hash[id] || document.getElementById(id); } })(); | query.split('&').forEach(function(pair){ pair = pair.split('='); if(pair.length === 2){ var key = pair[0]; var val = pair[1]; if(!hash[key]){ hash[key] = val; } else if(hash[key] instanceof Array){ hash[key].push(val); } else { hash[key] = [hash[key], val]; } } }); | var $ = (function(){ var hash = {}; return function(id){ return hash[id] || document.getElementById(id); }})(); |
.addCallback(function(ps){ TBRL.openQuickPostForm(ps); }).addErrback(function(e){ | TBRL.buttons = exts.map(function(ext, index){ var button = $N('button', { 'type' : 'button', 'class': 'taberareloo_button' }, [$N('img', { src: ext.ICON }), $N('span', null, ext.name)]); var li = $N('li', { 'class': 'taberareloo_item' }, button); TBRL.ol.appendChild(li); return button; }); | .addCallback(function(ps){ TBRL.openQuickPostForm(ps); }).addErrback(function(e){ |
function (args) { let count = args.count; let arg = args[0]; if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else dactyl.echoerr("E488: Trailing characters"); } else if (count > 0) tabs.select("-" + count, true); else tabs.select("-1", true); }, { | function () tabs.select("$", false), | function (args) { let count = args.count; let arg = args[0]; // count is ignored if an arg is specified, as per Vim if (arg) { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else ... |
$.each(queries[index], function (i, q) { | $.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; $.each(queries[index], function (i, q) { | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [],... |
var pos = -1; $.each(pending, function (i, e) { if (e == index) { pos = i; return false; } }); if (pos == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(pos, 1); if (pending.length == 0) { me._queries = null; Logger.debug("lookup successful."); ctx.phrase = phrase; ... | $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [],... | |
callLater(0, function(){ if(TBRL.field_shown){ TBRL.field_delete(); } else { if(!TBRL.field){ TBRL.field = $N('div', { id: 'taberareloo_background' }); TBRL.ol = $N('ol', { id: 'taberareloo_list' }); TBRL.field.appendChild(TBRL.ol); } TBRL.field_shown = true; TBRL.field.addEventListener('click', TBRL.field_clicked, tru... | .addCallback(function(ps){ chrome.extension.sendRequest(TBRL.id, { request: "share", show : show, content: update({ page : ctx.title, pageUrl : ctx.href }, ps) }, function(res){ }); | callLater(0, function(){ if(TBRL.field_shown){ TBRL.field_delete(); } else { if(!TBRL.field){ TBRL.field = $N('div', { id: 'taberareloo_background' }); TBRL.ol = $N('ol', { id: 'taberareloo_list' }); TBRL.field.appendChild(TB... |
test("Properly sets cursor class", function() { var view = SC.View.create(); var context = view.renderContext(); var cursor = SC.Cursor.create({className: 'testClass'}); view.set('cursor', cursor); view.prepareContext(context, YES); ok(context.hasClass(cursor.get('className')), "Should have cursor object's class"); va... | test("invokes renderMixin() from mixins, passing context & firstTime", function() { var runCount = 0; var context, isFirstTime ; var mixinA = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var mixin... | test("Properly sets cursor class", function() { var view = SC.View.create(); var context = view.renderContext(); var cursor = SC.Cursor.create({className: 'testClass'}); view.set('cursor', cursor); view.prepareContext(context, YES); ok(context.hasClass(cursor.get('className')), "Should have cursor object's class"... |
return this.gsub(pattern, function(match) { if (--count < 0) return match[0]; return replacement(match); }); | 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(... | return this.gsub(pattern, function(match) { if (--count < 0) return match[0]; return replacement(match); }); |
this._backend.query(this, function () { ctx._updateCandidates(ctx._predict()); | return $.map(m, function (e) { return e[1]; | this._backend.query(this, function () { ctx._updateCandidates(ctx._predict()); }); |
args = args[0]; | args = args[0] || ""; | function (args) { args = args[0]; // ignore invalid mark characters unless there are no valid mark chars dactyl.assert(!args || /[a-zA-Z]/.test(args), "E283: No marks matching " + args.quote()); let filter = args.replace(/[^a-zA-... |
function () { document.commandDispatcher.rewindFocus(); }); | function (args) { completion.listCompleter("macro", args[0]); }, { | function () { document.commandDispatcher.rewindFocus(); }); |
function (count) { Buffer.setZoom(count > 1 ? count : 100, false); }, | function (count) { buffer.zoomOut(Math.max(count, 1) * 3, false); }, | function (count) { Buffer.setZoom(count > 1 ? count : 100, false); }, |
return self.getForm(endpoint).addCallback(function(form){ update(form, self[ps.type.capitalize()].convertToForm(ps)); self.appendTags(form, ps); if (ps.type === 'video' && !form.embed_code) { var address = form.address; return request(address).addCallback(function(res) { | return request(address).addCallback(function(res) { | return self.getForm(endpoint).addCallback(function(form){ update(form, self[ps.type.capitalize()].convertToForm(ps)); self.appendTags(form, ps); if (ps.type === 'video' && !form.embed_code) { // embed_tagを取得してformに設定する var address = form.address; return request(addr... |
} return request(endpoint, { sendContent: form }); }); | return self.getForm(endpoint).addCallback(function(form){ update(form, self[ps.type.capitalize()].convertToForm(ps)); self.appendTags(form, ps); if (ps.type === 'video' && !form.embed_code) { // embed_tagを取得してformに設定する var address = form.address; return request(addr... | |
function () { let sel = buffer.getCurrentWord(); dactyl.assert(sel); dactyl.clipboardWrite(sel, true); }); | function () { tabs.reload(tabs.getTab(), true); }); | function () { let sel = buffer.getCurrentWord(); dactyl.assert(sel); dactyl.clipboardWrite(sel, true); }); |
"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.... | function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d... | "")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.... |
return gatherResults(urls.map(function(url){ return model.shorten(url); })).addCallback(function(ress){ | }).addCallback(function(res){ return res[url].shortUrl; }); | return gatherResults(urls.map(function(url){ return model.shorten(url); })).addCallback(function(ress){ |
function (count) { buffer.zoomIn(Math.max(count, 1), true); }, | function (count) { Buffer.setZoom(count > 1 ? count : 100, false) }, | function (count) { buffer.zoomIn(Math.max(count, 1), true); }, |
function (count) { buffer.zoomIn(Math.max(count, 1), true); }, | function (count) { Buffer.setZoom(count > 1 ? count : 100, false); }, | function (count) { buffer.zoomIn(Math.max(count, 1), true); }, |
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); }); | util.timeout(function () { let init = services.get("environment").get(config.idName + "_INIT"); let rcFile = io.getRCFile("~"); try { if (dactyl.commandLineOptions.rcFile) { let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); } else { if (init... | dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); }); |
return request(address).addCallback(function(res) { var doc = createHTML(res.responseText); var uri = createURI(address); var host = uri ? uri.host : ''; if (host.match('youtube.com')) { form.embed_code = $X('id("embed_code")/@value', doc)[0] || ''; } return request(endpoint, { sendContent: form }); }); | tags : getTags('yourtags').map(function(tag){ return { name : tag, frequency : -1 } }) | return request(address).addCallback(function(res) { var doc = createHTML(res.responseText); var uri = createURI(address); var host = uri ? uri.host : ''; if (host.match('youtube.com')) { form.embed_code = $X('id("embed_code")/@value', doc)[0] || ''; ... |
return request(address).addCallback(function(res) { var doc = createHTML(res.responseText); var uri = createURI(address); var host = uri ? uri.host : ''; if (host.match('youtube.com')) { form.embed_code = $X('id("embed_code")/@value', doc)[0] || ''; } return request(endpoint, { sendContent: form }); }); | return request(url).addCallback(function(res) { var doc = createHTML(res.responseText); var form = $X(' if(form.action === '/bookmarklet/account/login'){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } else { return formContents(form); } }); | return request(address).addCallback(function(res) { var doc = createHTML(res.responseText); var uri = createURI(address); var host = uri ? uri.host : ''; if (host.match('youtube.com')) { form.embed_code = $X('id("embed_code")/@value', doc)[0] || ''; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.