rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
input = elem = null ;
elem = null ;
test("pressing mouseDown and then mouseUp anywhere in the checkbox should toggle the selection", function() { var elem = view.get('layer'), input = SC.$('input', elem); SC.Event.trigger(elem, 'mousedown'); ok(view.get('isActive'), 'view should be active'); ok(view.get('value'), 'value should not change yet'); // simulate mouseUp and browser-native change to control SC.Event.trigger(elem,'mouseup'); input.attr('checked', NO); SC.Event.trigger(input.get(0),'click'); ok(!view.get('isActive'), 'view should no longer be active'); ok(!view.get('value'), 'value should change to NO'); input = elem = null ;});
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);
this.map(nl, function(n) { var v; if (n.nodeType == 3) { v = n.nodeValue; var tokens = n.nodeValue.split(seps); var previous = ""; var doReplaces = []; iterator = new TokenIterator(tokens); while (iterator.hasNext()) { var token = iterator.next(); var current = errors['__' + token]; var defaults; if (current != undefined && current.pretoks != undefined) { defaults = current.defaults; current = current.pretoks['__' + previous]; var done = false; var prev, curr; prev = v.substr(0, iterator.getCount()); curr = v.substr(prev.length, v.length); var checkErrors = function(error) { if (error != undefined && !error.used && error.regexp.test(curr)) { var oldlen = curr.length; doReplaces.push([error.regexp, '<span class="'+error.type+'" pre="'+previous+'">$&</span>']); error.used = true; done = true; } }; if (current != undefined) { previous = previous + ' '; parent.map(current, checkErrors); } if (!done) { previous = ''; parent.map(defaults, checkErrors); } } previous = token; } if (doReplaces.length > 0) { newNode = n; for (var x = 0; x < doReplaces.length; x++) { var regexp = doReplaces[x][0], result = doReplaces[x][1]; var bringTheHurt = function(node) { if (node.nodeType == 3) { ecount++; if (parent.isIE() && node.nodeValue.length > 0 && node.nodeValue.substr(0, 1) == ' ') return parent.create('<span class="mceItemHidden">&nbsp;</span>' + node.nodeValue.substr(1, node.nodeValue.length - 1).replace(regexp, result), false); else return parent.create(node.nodeValue.replace(regexp, result), false); } else { var contents = parent.contents(node); for (var y = 0; y < contents.length; y++) { if (contents[y].nodeType == 3 && regexp.test(contents[y].nodeValue)) { var nnode; if (parent.isIE() && contents[y].nodeValue.length > 0 && contents[y].nodeValue.substr(0, 1) == ' ') nnode = parent.create('<span class="mceItemHidden">&nbsp;</span>' + contents[y].nodeValue.substr(1, contents[y].nodeValue.length - 1).replace(regexp, result), true); else nnode = parent.create(contents[y].nodeValue.replace(regexp, result), true); parent.replaceWith(contents[y], nnode); parent.removeParent(nnode); ecount++; return node; } } return node; } }; newNode = bringTheHurt(newNode); } parent.replaceWith(n, newNode);
this.map(this.findSpans(node).reverse(), function(n) { if (n && (parent.isMarkedNode(n) || parent.hasClass(n, 'mceItemHidden') || parent.isEmptySpan(n)) ) { if (n.innerHTML == '&nbsp;') { var nnode = document.createTextNode(' '); /* hax0r */ parent.replaceWith(n, nnode); } else if (!w || n.innerHTML == w) { parent.removeParent(n); count++; } } });
else if (!w || n.innerHTML == w) { parent.removeParent(n); count++; } }
}
this.map(this.findSpans(node).reverse(), function(n) { if (n && (parent.isMarkedNode(n) || parent.hasClass(n, 'mceItemHidden') || parent.isEmptySpan(n)) ) { if (n.innerHTML == '&nbsp;') { var nnode = document.createTextNode(' '); /* hax0r */ parent.replaceWith(n, nnode); } else if (!w || n.innerHTML == w) { parent.removeParent(n); count++; } } });
str = str.replace(resep, function (match, before) { results.push(before); cont = true; return ""; });
: function () { for (let i = 0; i < this.snapshotLength; i++) yield this.snapshotItem(i); };
str = str.replace(resep, function (match, before) { results.push(before); cont = true; return ""; });
.addErrback(function(){ renderError(response, 404, 'No such file, ' + path);
reschedule(function () { promise.emitSuccess('');
.addErrback(function(){ renderError(response, 404, 'No such file, ' + path); });
'class': 'taberareloo_button'
'class': 'taberareloo_button', 'style': TBRL.styles.button
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; });
src: ext.ICON }), $N('span', null, ext.name)]);
src: ext.ICON, 'style': TBRL.styles.img }), $N('span', { 'style': TBRL.styles.span }, ext.name)]);
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; });
'class': 'taberareloo_item'
'class': 'taberareloo_item', 'style': TBRL.styles.li
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; });
splits.forEach(function(i, idx, a){
dojoContents = dojoContents.replace(provideRegExp, function(s, p1){ if(p1){ var ret = ""; p1 = p1.slice(1, -1); var splits = p1.split("."); splits.forEach(function(i, idx, a){
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]; } } // make sure that if, in a given module, we've already seen a // parent that we don't re-generate its stub detection if(!seenProvides[simpleShortName]){ seenProvides[simpleShortName] = true; if(idx == 0){ ret += 'if(typeof ' + shortName + '=="undefined"){' + shortName + '={};};'; }else{ ret += shortName+'='+shortName+'||{};'; } } // at the last one? if(idx == (a.length-1)){ // register in _loadedModules: ret += 'dojo._loadedModules["'+simpleShortName+'"] = '+shortName+';'; } });
return ret; }else{ return s; } });
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]; } } // make sure that if, in a given module, we've already seen a // parent that we don't re-generate its stub detection if(!seenProvides[simpleShortName]){ seenProvides[simpleShortName] = true; if(idx == 0){ ret += 'if(typeof ' + shortName + '=="undefined"){' + shortName + '={};};'; }else{ ret += shortName+'='+shortName+'||{};'; } } // at the last one? if(idx == (a.length-1)){ // register in _loadedModules: ret += 'dojo._loadedModules["'+simpleShortName+'"] = '+shortName+';'; } });
getSelected().addCallback(function(tab){ if(isPopup && background.TBRL.Popup.contents[tab.url]){ main.callback(background.TBRL.Popup.contents[tab.url]); } else if(window.ps){ main.callback(window.ps); } else { getPsInfo(tab).addCallback(function(ps){
getPsInfo(tab).addCallback(function(ps){
getSelected().addCallback(function(tab){ if(isPopup && background.TBRL.Popup.contents[tab.url]){ main.callback(background.TBRL.Popup.contents[tab.url]); } else if(window.ps){ main.callback(window.ps); } else { getPsInfo(tab).addCallback(function(ps){ main.callback(ps); }); } });
} });
getSelected().addCallback(function(tab){ if(isPopup && background.TBRL.Popup.contents[tab.url]){ main.callback(background.TBRL.Popup.contents[tab.url]); } else if(window.ps){ main.callback(window.ps); } else { getPsInfo(tab).addCallback(function(ps){ main.callback(ps); }); } });
array.flatten(files).forEach(function (file) { tagMap[file + ".xml"] = file; findHelpFile(file).forEach(function (doc) {
findHelpFile(file).forEach(function (doc) {
array.flatten(files).forEach(function (file) { tagMap[file + ".xml"] = file; findHelpFile(file).forEach(function (doc) { addTags(file, doc); }); });
});
array.flatten(files).forEach(function (file) { tagMap[file + ".xml"] = file; findHelpFile(file).forEach(function (doc) { addTags(file, doc); }); });
$(event.target).find("[type='checkbox']").each(function(){ if($(this).val() === id){ $(this).attr('checked',true); } })
this.element.bind('dcmgrGUI.updateList',function(event,params){ self.update(params.request,true) });
$(event.target).find("[type='checkbox']").each(function(){ if($(this).val() === id){ $(this).attr('checked',true); } })
commands.forEach(function (cmd)
function (count) { commands.forEach(function (cmd)
commands.forEach(function (cmd) editor.executeCommand(cmd, 1));
modes.set(modes.INSERT, modes.TEXTAREA); });
commands.forEach(function (cmd) editor.executeCommand(cmd, 1));
$.getJSON(this.DATA_DIR + prefix + this.JSON, null, function (data) { data.prefix = prefix; me._dict = data; if (callback) { callback(schema);
$.getJSON(this.DATA_DIR + schemaName + this.CONFIG, null, function(config) { for (var k in config.fuzzyMap) { var s = {}; $.each(config.fuzzyMap[k], function(i, e) { s[e] = true; }); config.fuzzyMap[k] = s;
$.getJSON(this.DATA_DIR + prefix + this.JSON, null, function (data) { data.prefix = prefix; me._dict = data; if (callback) { callback(schema); } });
callback(config);
$.getJSON(this.DATA_DIR + prefix + this.JSON, null, function (data) { data.prefix = prefix; me._dict = data; if (callback) { callback(schema); } });
return request(ctx.link.href).addCallback(function(res){ return { type : 'photo', item : ctx.title, itemUrl : $X(' }
return this.getForm(ctx, endpoint).addCallback(function(form){ return update({ type : form['post[type]'], item : ctx.title, itemUrl : ctx.href, favorite : { name : 'Tumblr', endpoint : endpoint, form : form } }, self.convertToParams(form));
return request(ctx.link.href).addCallback(function(res){ return { type : 'photo', item : ctx.title, itemUrl : $X('//img[1]', createHTML(res.responseText))[0].src } });
list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page);
c_list.page = c_pagenate.current_page; list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_list.page); list_request.data = DcmgrGUI.Util.getPagenateData(c_pagenate.start,c_pagenate.row);
bt_refresh.element.bind('dcmgrGUI.refresh',function(){ list_request.url = DcmgrGUI.Util.getPagePath('/instances/list/',c_pagenate.current_page); c_list.element.trigger('dcmgrGUI.updateList',{request:list_request}) //update detail $.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_id) },true); }); });
args.forEach(function (f) f.remove(false));
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.isDirectory() && dir.isReadable()) { io.cwd = dir.path; dactyl.echomsg(io.cwd); return; } } dactyl.echoerr("E344: Can't find directory " + arg.quote() + " in cdpath"); dactyl.echoerr("E472: Command failed"); } }, {
args.forEach(function (f) f.remove(false));
dactyl.withSavedValues(["forceNewTab"], function () { this.forceNewTab = true; this.execute(args[0] || "", null, true); });
function (args) { let alternate = tabs.alternate; try { dactyl.execute(args[0] || "", null, true); } finally { tabs.updateSelectionHistory([tabs.getTab(), alternate]); } }, {
dactyl.withSavedValues(["forceNewTab"], function () { this.forceNewTab = true; this.execute(args[0] || "", null, true); });
dactyl.assert(!args || /[a-zA-Z0-9]/.test(args), "E283: No QuickMarks matching \"" + args + "\"");
dactyl.assert(!args || /[a-zA-Z0-9]/.test(args), "E283: No QuickMarks matching " + args.quote());
function (args) { args = args.string; // ignore invalid qmark characters unless there are no valid qmark chars dactyl.assert(!args || /[a-zA-Z0-9]/.test(args), "E283: No QuickMarks matching \"" + args + "\""); let filter = args.replace(/[^a-zA-Z0-9]/g, ""); quickmarks.list(filter); });
function () { commandline.open(":", "tabopen " + util.losslessDecodeURI(buffer.URL), modes.EX); });
function () { commandline.open("", "tabopen " + util.losslessDecodeURI(buffer.URL), modes.EX); });
function () { commandline.open(":", "tabopen " + util.losslessDecodeURI(buffer.URL), modes.EX); });
let arg = args.literalArg;
let arg = args[0];
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 ../ and ./ paths 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() && dir.isReadable()) { io.cwd = dir.path; dactyl.echomsg(io.cwd); return; } } dactyl.echoerr("E344: Can't find directory " + arg.quote() + " in cdpath"); dactyl.echoerr("E472: Command failed"); } }, {
bt_delete_security_group.open(id);
bt_delete_security_group.open({"ids":[id]});
bt_delete_security_group.target.bind('click',function(){ var id = c_list.currentChecked(); if( id ){ bt_delete_security_group.open(id); } return false; });
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&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
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("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
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&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
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; });
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, true); var ctx = TBRL.createContext(); var exts = Extractors.check(ctx); TBRL.ctx = ctx; TBRL.exts = exts; 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; }); (document.body || document.documentElement).appendChild(TBRL.field); TBRL.buttons[0].focus(); } });
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; });
function () tabs.select("$", false),
function (args) { for (let i = 0; i < tabs.count; i++) { tabs.select(i); dactyl.execute(args[0], null, true); } }, {
function () tabs.select("$", false),
return request(url).addCallback(function(res){ var doc = createHTML(res.responseText); var form = formContents($X(' delete form.preview_post; form.redirect_to = self.TUMBLR_URL+'dashboard'; if(form.reblog_post_id){ if(form['post[type]']==='photo') form.image = $X('id("edit_post") } return form; });
return (function(target){ var bg = getComputedStyle(elm, '').backgroundImage; if(bg){ return bg; } else { var parent = elm.parentNode; if(parent === doc){ return null; } else { return arguments.callee(parent); } } })(elm);
return request(url).addCallback(function(res){ var doc = createHTML(res.responseText); var form = formContents($X('//form', doc)[1]); delete form.preview_post; form.redirect_to = self.TUMBLR_URL+'dashboard'; if(form.reblog_post_id){ // self.trimReblogInfo(form); // Tumblrから他サービスへポストするため画像URLを取得しておく if(form['post[type]']==='photo') form.image = $X('id("edit_post")//img[contains(@src, "media.tumblr.com/") or contains(@src, "data.tumblr.com/")]/@src', doc)[0]; } return form; });
$.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) {
(function (index) { pending.push(index); $.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) {
$.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; // generate query results $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); var i = pending.indexOf(index); if (i == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(i, 1); if (pending.length == 0) { me._queries = null; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } });
var i = pending.indexOf(index); if (i == -1) {
var pos = -1; $.each(pending, function (i, e) { if (e == index) { pos = i; return false; } }); if (pos == -1) {
$.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; // generate query results $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); var i = pending.indexOf(index); if (i == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(i, 1); if (pending.length == 0) { me._queries = null; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } });
pending.splice(i, 1);
pending.splice(pos, 1);
$.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; // generate query results $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); var i = pending.indexOf(index); if (i == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(i, 1); if (pending.length == 0) { me._queries = null; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } });
})(k);
$.getJSON(me.DATA_DIR + prefix + me.SEPARATOR + index + me.JSON, null, function (data) { Logger.debug("fetched: " + index); if (me._queries !== queries) return; // generate query results $.each(queries[index], function (i, q) { var p = phrase[q.start]; if (!p) { p = phrase[q.start] = []; } // filter results $.each(data[q.ikey.join(" ")] || [], function (i, e) { var r = me._checkEntry(e, ctx._segmentation, q.start, q.end); if (r) { if (!p[r.end]) p[r.end] = [r]; else p[r.end].push(r); } }); }); var i = pending.indexOf(index); if (i == -1) { Logger.error("index '" + index + "' lost trace in pending lookups."); return; } pending.splice(i, 1); if (pending.length == 0) { me._queries = null; Logger.debug("lookup successful."); ctx.phrase = phrase; ctx.prediction = me._makePrediction(phrase, ctx._segmentation); callback(); } });
.addCallback(function(ps){ TBRL.openQuickPostForm(ps); });
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); });
test("invokes renderMixin() from mixins, passing context & firstTime", function() {
test("invokes render() passing context & firstTime", function() {
test("invokes renderMixin() from mixins, passing context & firstTime", function() { var runCount = 0; var context, isFirstTime ; // define a few mixins to make sure this works w/ multiple mixins var mixinA = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var mixinB = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var view = SC.View.create(mixinA, mixinB) ; context = view.renderContext(); isFirstTime = YES; view.prepareContext(context, YES); equals(runCount, 2, 'did invoke renderMixin() from both mixins'); runCount = 0 ; context = view.renderContext(); isFirstTime = NO; view.prepareContext(context, NO); equals(runCount, 2, 'did invoke renderMixin() from both mixins');});
var mixinA = { renderMixin: function(theContext, firstTime) {
var view = SC.View.create({ render: function(theContext, firstTime) {
test("invokes renderMixin() from mixins, passing context & firstTime", function() { var runCount = 0; var context, isFirstTime ; // define a few mixins to make sure this works w/ multiple mixins var mixinA = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var mixinB = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var view = SC.View.create(mixinA, mixinB) ; context = view.renderContext(); isFirstTime = YES; view.prepareContext(context, YES); equals(runCount, 2, 'did invoke renderMixin() from both mixins'); runCount = 0 ; context = view.renderContext(); isFirstTime = NO; view.prepareContext(context, NO); equals(runCount, 2, 'did invoke renderMixin() from both mixins');});
}; var mixinB = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var view = SC.View.create(mixinA, mixinB) ;
}) ;
test("invokes renderMixin() from mixins, passing context & firstTime", function() { var runCount = 0; var context, isFirstTime ; // define a few mixins to make sure this works w/ multiple mixins var mixinA = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var mixinB = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var view = SC.View.create(mixinA, mixinB) ; context = view.renderContext(); isFirstTime = YES; view.prepareContext(context, YES); equals(runCount, 2, 'did invoke renderMixin() from both mixins'); runCount = 0 ; context = view.renderContext(); isFirstTime = NO; view.prepareContext(context, NO); equals(runCount, 2, 'did invoke renderMixin() from both mixins');});
equals(runCount, 2, 'did invoke renderMixin() from both mixins');
equals(runCount, 1, 'did invoke render()');
test("invokes renderMixin() from mixins, passing context & firstTime", function() { var runCount = 0; var context, isFirstTime ; // define a few mixins to make sure this works w/ multiple mixins var mixinA = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var mixinB = { renderMixin: function(theContext, firstTime) { equals(context, theContext, 'context passed'); equals(firstTime, isFirstTime, 'firstTime passed'); runCount++; } }; var view = SC.View.create(mixinA, mixinB) ; context = view.renderContext(); isFirstTime = YES; view.prepareContext(context, YES); equals(runCount, 2, 'did invoke renderMixin() from both mixins'); runCount = 0 ; context = view.renderContext(); isFirstTime = NO; view.prepareContext(context, NO); equals(runCount, 2, 'did invoke renderMixin() from both mixins');});
return function() { return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); }
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(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
return function() { return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); }
return $.map(m, function (e) { return e[1];
var m = $.grep(this.config, function (e) { return e[0] == key;
return $.map(m, function (e) { return e[1]; });
modes.push(modes.INSERT); });
commands.forEach(function (cmd) editor.executeCommand(cmd, 1));
historyAction = new Array(); pathProperties = new Array();
$("#columnBuilder").click(function(){ //show the path bulder div $("#divPathWizard").show(speed*2); getRootClassesOfInstances(); });
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){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/instances/detail/',check_id) },true); });
c_pagenate.element.bind('dcmgrGUI.updatePagenate',function(){ c_list.clearCheckedList(); $('#detail').html(''); bt_refresh.element.trigger('dcmgrGUI.refresh'); });
let mark = args[0];
let mark = args[0] || "";
function (args) { let mark = args[0]; dactyl.assert(mark.length <= 1, "E488: Trailing characters"); dactyl.assert(/[a-zA-Z]/.test(mark), "E191: Argument must be a letter or forward/backward quote"); marks.add(mark); },
this.registerCallback("change", modes.EX, function (command) { self._autocompleteTimer.tell(false);
this.registerCallback("change", modes.EX, function (command, from) { if (from !== "history") self._autocompleteTimer.tell(false);
this.registerCallback("change", modes.EX, function (command) { self._autocompleteTimer.tell(false); });
function () { document.commandDispatcher.advanceFocus(); });
function (args) { dactyl.assert(!args.bang || !args[0], "E474: Invalid argument"); if (args.bang) events.deleteMacros(); else if (args[0]) events.deleteMacros(args[0]); else dactyl.echoerr("E471: Argument required"); }, {
function () { document.commandDispatcher.advanceFocus(); });
$.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('/volumes/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){ $($('#detail').find('#'+check_id)).remove(); c_list.checked_list[check_id].c_detail.update({ url:DcmgrGUI.Util.getPagePath('/volumes/show/',check_id) },true); });
function () { let url = dactyl.clipboardRead(); dactyl.assert(url, "No clipboard data"); dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB, background: true }); });
.filter(function (elem) { if (isinstance(elem, [HTMLFrameElement, HTMLIFrameElement])) return Editor.getEditor(elem.contentWindow); if (elem.readOnly || elem instanceof HTMLInputElement && !set.has(util.editableInputs, elem.type)) return false; let computedStyle = util.computedStyle(elem); let rect = elem.getBoundingClientRect(); return computedStyle.visibility != "hidden" && computedStyle.display != "none" && computedStyle.MozUserFocus != "ignore" && rect.width && rect.height; });
function () { let url = dactyl.clipboardRead(); dactyl.assert(url, "No clipboard data"); dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB, background: true }); });
function (args) { Dactyl.showHelpIndex("normal-index", mappings, args.bang); }, {
function (args) { if (args.bang) dactyl.open("about:"); else dactyl.echo(template.commandOutput(<>{config.name} {dactyl.version} running on:<br/>{navigator.userAgent}</>)); }, {
function (args) { Dactyl.showHelpIndex("normal-index", mappings, args.bang); }, {
return this.getKanaReadings(str).addCallback(function(rs){ var katakana = rs.join('').split(' [').join('\u0000').toKatakana(); var katakanas = katakana.split('\u0000'); return zip(self.toSparseRomaReadings(katakana), tags).map(function(pair, index){
return zip(self.toSparseRomaReadings(katakana), tags).map(function(pair, index){
return this.getKanaReadings(str).addCallback(function(rs){ var katakana = rs.join('').split(' [').join('\u0000').toKatakana(); var katakanas = katakana.split('\u0000'); return zip(self.toSparseRomaReadings(katakana), tags).map(function(pair, index){ var reading = pair[0], tag = pair[1]; // 再計算flagがたっているか. 分岐考慮型計算は時間食うのでできるだけしない. if(~reading.indexOf('\u0001')){ var res = { readings: self.duplicateRomaReadings(katakanas[index]), value: tag }; return res; } else { return { value: tag, reading: reading }; } }); });
});
return this.getKanaReadings(str).addCallback(function(rs){ var katakana = rs.join('').split(' [').join('\u0000').toKatakana(); var katakanas = katakana.split('\u0000'); return zip(self.toSparseRomaReadings(katakana), tags).map(function(pair, index){ var reading = pair[0], tag = pair[1]; // 再計算flagがたっているか. 分岐考慮型計算は時間食うのでできるだけしない. if(~reading.indexOf('\u0001')){ var res = { readings: self.duplicateRomaReadings(katakanas[index]), value: tag }; return res; } else { return { value: tag, reading: reading }; } }); });
this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z=
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z=
function (args) { if (args.bang) dactyl.open("about:"); else commandline.commandOutput(<> {config.appName} {dactyl.version} running on:<br/>{navigator.userAgent} </>); }, {
function (args) { Dactyl.showHelpIndex("normal-index", mappings, args.bang); }, {
function (args) { if (args.bang) dactyl.open("about:"); else commandline.commandOutput(<> {config.appName} {dactyl.version} running on:<br/>{navigator.userAgent} </>); }, {
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 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) { 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("embed_code")/@value', doc)[0] || ''; } return request(endpoint, { sendContent: form }); }); } return request(endpoint, { sendContent: form }); });
return request(url).addCallback(function(res) { var doc = createHTML(res.responseText); var form = $X('//form', doc)[0]; if(form.action === '/bookmarklet/account/login'){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } else { return formContents(form); } });
(function() { Object.extend(this.tags, { THEAD: this.tags.TBODY, TFOOT: this.tags.TBODY, TH: this.tags.TD }); }).call(Element._insertionTranslations);
return $R(1, total).inject([], function(memo, i) { if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); return memo; });
(function() { Object.extend(this.tags, { THEAD: this.tags.TBODY, TFOOT: this.tags.TBODY, TH: this.tags.TD });}).call(Element._insertionTranslations);
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
function (args) { Liberator.showHelpIndex("normal-index", mappings, args.bang); }, {
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
function () !atEnd(-1), BEEP);
function () { Buffer.scrollVertical(body(), "pages", -1); },
function () !atEnd(-1), BEEP);
function (ev, arg) { ext.exec("twitter-client-tweet", arg); }, "Tweet", true);
function (filterName) { self.addUserToFilter(status.user.screen_name, filterName); }, util.format(M({ja: "%s の追加先:", en: "Add %s to:"}), status.user.screen_name));
function (ev, arg) { ext.exec("twitter-client-tweet", arg); }, "Tweet", true);
dactyl.open(url);
dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB, background: true });
function () { let url = dactyl.clipboardRead(); dactyl.assert(url, "No clipboard data"); dactyl.open(url); });
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
function (args) { Dactyl.showHelpIndex("normal-index", mappings, args.bang); }, {
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
return zip(self.toSparseRomaReadings(katakana), tags).map(function(pair, index){ var reading = pair[0], tag = pair[1]; if(~reading.indexOf('\u0001')){ var res = { readings: self.duplicateRomaReadings(katakanas[index]), value: tag }; return res; } else { return { value: tag, reading: reading }; } });
return this.stackWalker(stack).map(function(l){ return l.join('') });
return zip(self.toSparseRomaReadings(katakana), tags).map(function(pair, index){ var reading = pair[0], tag = pair[1]; // 再計算flagがたっているか. 分岐考慮型計算は時間食うのでできるだけしない. if(~reading.indexOf('\u0001')){ var res = { readings: self.duplicateRomaReadings(katakanas[index]), value: tag }; return res; } else { return { value: tag, reading: reading }; } });
this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z= c(this);a[0]=j.call(this,t,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ua(a,this,o);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],e.cacheable||this.length>1||p>0?e.fragment.cloneNode(true):e.fragment)}o&&c.each(o,La)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z=c(this);a[0]=j.call(this,t,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ua(a,this,o);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],e.cacheable||this.length>1||p>0?e.fragment.cloneNode(true):e.fragment)}o&&c.each(o,La)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},
function (args) { Dactyl.showHelpIndex("normal-index", mappings, args.bang); }, {
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
function (args) { Dactyl.showHelpIndex("normal-index", mappings, args.bang); }, {
})).forEach(function(pair) { var name = pair[0], value = pair[1]; if (!value) return; form[name] += value; });
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) { 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(endpoint, { sendContent: form }); });
})).forEach(function(pair) { var name = pair[0], value = pair[1]; if (!value) return; form[name] += value; });
setTimeout(function () { liberator.help(); options.setPref(firstTime, false); }, 1000);
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
setTimeout(function () { liberator.help(); options.setPref(firstTime, false); }, 1000);
function () { Buffer.scrollVertical(body(), "pages", -1); },
function () !atEnd(-1), BEEP);
function () { Buffer.scrollVertical(body(), "pages", -1); },
Element.extend = (function() { if (Prototype.BrowserFeatures.SpecificElementExtensions) return Prototype.K; var Methods = { }, ByTag = Element.Methods.ByTag; var extend = Object.extend(function(element) { if (!element || element._extendedByPrototype || element.nodeType != 1 || element == window) return element; var methods = Object.clone(Methods), tagName = element.tagName.toUpperCase(), property, value; if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); for (property in methods) { value = methods[property]; if (Object.isFunction(value) && !(property in element)) element[property] = value.methodize(); } element._extendedByPrototype = Prototype.emptyFunction; return element; }, { refresh: function() { if (!Prototype.BrowserFeatures.ElementExtensions) { Object.extend(Methods, Element.Methods); Object.extend(Methods, Element.Methods.Simulated); } } }); extend.refresh(); return extend; })();
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(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
Element.extend = (function() { if (Prototype.BrowserFeatures.SpecificElementExtensions) return Prototype.K; var Methods = { }, ByTag = Element.Methods.ByTag; var extend = Object.extend(function(element) { if (!element || element._extendedByPrototype || element.nodeType != 1 || element == window) return element; var methods = Object.clone(Methods), tagName = element.tagName.toUpperCase(), property, value; // extend methods for specific tags if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); for (property in methods) { value = methods[property]; if (Object.isFunction(value) && !(property in element)) element[property] = value.methodize(); } element._extendedByPrototype = Prototype.emptyFunction; return element; }, { refresh: function() { // extend methods for all tags (Safari doesn't need this) if (!Prototype.BrowserFeatures.ElementExtensions) { Object.extend(Methods, Element.Methods); Object.extend(Methods, Element.Methods.Simulated); } } }); extend.refresh(); return extend;})();
dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB });
dactyl.open(url);
function () { let url = dactyl.clipboardRead(); dactyl.assert(url, "No clipboard data"); dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB }); });
setTimeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
setTimeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
util.timeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
AddonManager.getAddonByID(services.get("dactyl:").addonID, function (addon) { dactyl.version = addon.version + " (created: @DATE@)"; });
util.timeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
return this.stackWalker(stack).map(function(l){ return l.join('') });
items(Models.Yahoo.katakana).forEach(function(pair){ var val = pair[1]; if(Array.isArray(val)) Models.Yahoo.lengthMap[pair[0]] = val.length; });
return this.stackWalker(stack).map(function(l){ return l.join('') });
function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){T(this.getElementsByTagName("*"));T([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&T(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){T(this.getElementsByTagName("*"));T([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&T(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
AddonManager.getAddonByID(services.get("dactyl:").addonID, function (addon) { options.setPref("extensions.dactyl.version", addon.version); dactyl.version = addon.version + " (created: @DATE@)"; });
AddonManager.getAddonsByTypes(["extension"], function (addons) { context.incomplete = false; context.completions = addons; });
return this.postForm(function(){ return request(ps.favorite.endpoint, { sendContent: 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] || ''; } return request(endpoint, { sendContent: form }); });
return this.postForm(function(){ return request(ps.favorite.endpoint, { sendContent: form }); });
function () !atEnd(-1), BEEP);
function () { Buffer.scrollToPercent(body(), null, 0); })
function () !atEnd(-1), BEEP);
var extend = Object.extend(function(element) { if (!element || element._extendedByPrototype || element.nodeType != 1 || element == window) return element; var methods = Object.clone(Methods), tagName = element.tagName.toUpperCase(), property, value; if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); for (property in methods) { value = methods[property]; if (Object.isFunction(value) && !(property in element)) element[property] = value.methodize(); } element._extendedByPrototype = Prototype.emptyFunction; 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(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div");var b=document.createElement("form");var a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Abstract={};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};var Class=(function(){function a(){}function b(){var g=null,f=$A(arguments);if(Object.isFunction(f[0])){g=f.shift()}function d(){this.initialize.apply(this,arguments)}Object.extend(d,Class.Methods);d.superclass=g;d.subclasses=[];if(g){a.prototype=g.prototype;d.prototype=new a;g.subclasses.push(d)}for(var e=0;e<f.length;e++){d.addMethods(f[e])}if(!d.prototype.initialize){d.prototype.initialize=Prototype.emptyFunction}d.prototype.constructor=d;return d}function c(k){var f=this.superclass&&this.superclass.prototype;var e=Object.keys(k);if(!Object.keys({toString:true}).length){if(k.toString!=Object.prototype.toString){e.push("toString")}if(k.valueOf!=Object.prototype.valueOf){e.push("valueOf")}}for(var d=0,g=e.length;d<g;d++){var j=e[d],h=k[j];if(f&&Object.isFunction(h)&&h.argumentNames().first()=="$super"){var l=h;h=(function(i){return function(){return f[i].apply(this,arguments)}})(j).wrap(l);h.valueOf=l.valueOf.bind(l);h.toString=l.toString.bind(l)}this.prototype[j]=h}return this}return{create:b,Methods:{addMethods:c}}})();(function(){var d=Object.prototype.toString;function i(q,s){for(var r in s){q[r]=s[r]}return q}function l(q){try{if(e(q)){return"undefined"}if(q===null){return"null"}return q.inspect?q.inspect():String(q)}catch(r){if(r instanceof RangeError){return"..."}throw r}}function k(q){var s=typeof q;switch(s){case"undefined":case"function":case"unknown":return;case"boolean":return q.toString()}if(q===null){return"null"}if(q.toJSON){return q.toJSON()}if(h(q)){return}var r=[];for(var u in q){var t=k(q[u]);if(!e(t)){r.push(u.toJSON()+": "+t)}}return"{"+r.join(", ")+"}"}function c(q){return $H(q).toQueryString()}function f(q){return q&&q.toHTML?q.toHTML():String.interpret(q)}function o(q){var r=[];for(var s in q){r.push(s)}return r}function m(q){var r=[];for(var s in q){r.push(q[s])}return r}function j(q){return i({},q)}function h(q){return !!(q&&q.nodeType==1)}function g(q){return d.call(q)=="[object Array]"}function p(q){return q instanceof Hash}function b(q){return typeof q==="function"}function a(q){return d.call(q)=="[object String]"}function n(q){return d.call(q)=="[object Number]"}function e(q){return typeof q==="undefined"}i(Object,{extend:i,inspect:l,toJSON:k,toQueryString:c,toHTML:f,keys:o,values:m,clone:j,isElement:h,isArray:g,isHash:p,isFunction:b,isString:a,isNumber:n,isUndefined:e})})();Object.extend(Function.prototype,(function(){var k=Array.prototype.slice;function d(o,l){var n=o.length,m=l.length;while(m--){o[n+m]=l[m]}return o}function i(m,l){m=k.call(m,0);return d(m,l)}function g(){var l=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\
var extend = Object.extend(function(element) { if (!element || element._extendedByPrototype || element.nodeType != 1 || element == window) return element; var methods = Object.clone(Methods), tagName = element.tagName.toUpperCase(), property, value; // extend methods for specific tags if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); for (property in methods) { value = methods[property]; if (Object.isFunction(value) && !(property in element)) element[property] = value.methodize(); } element._extendedByPrototype = Prototype.emptyFunction; return element; }, {
function () { tabs.reload(config.browser.mCurrentTab, false); });
function () { let url = dactyl.clipboardRead(); dactyl.assert(url, "No clipboard data"); dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB }); });
function () { tabs.reload(config.browser.mCurrentTab, false); });
$w('width height').each(function(d) { var D = d.capitalize(); if (B.WebKit && !document.evaluate) { dimensions[d] = self['inner' + D]; } else if (B.Opera && parseFloat(window.opera.version()) < 9.5) { dimensions[d] = document.body['client' + D] } else { dimensions[d] = document.documentElement['client' + D]; } });
return $R(1, total).inject([], function(memo, i) { if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); return memo; });
$w('width height').each(function(d) { var D = d.capitalize(); if (B.WebKit && !document.evaluate) { // Safari <3.0 needs self.innerWidth/Height dimensions[d] = self['inner' + D]; } else if (B.Opera && parseFloat(window.opera.version()) < 9.5) { // Opera <9.5 needs document.body.clientWidth/Height dimensions[d] = document.body['client' + D] } else { dimensions[d] = document.documentElement['client' + D]; } });
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); });
setTimeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); });
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); });
util.timeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); });
items(Models.Yahoo.katakana).forEach(function(pair){ var val = pair[1]; if(Array.isArray(val)) Models.Yahoo.lengthMap[pair[0]] = val.length; });
return request('http: if(res.responseText.indexOf('login_form')!=-1) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); var doc = createHTML(res.responseText); return formContents($X('id("addbookmark")/descendant::div[contains(concat(" ",normalize-space(@class)," ")," bd ")]', doc)[0]); }).addCallback(function(fs){
items(Models.Yahoo.katakana).forEach(function(pair){ var val = pair[1]; if(Array.isArray(val)) Models.Yahoo.lengthMap[pair[0]] = val.length;});
AddonManager.getAddonByID(services.get("dactyl:").addonID, function (addon) { options.setPref("extensions.dactyl.version", addon.version); dactyl.version = addon.version + " (created: @DATE@)"; });
util.timeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
AddonManager.getAddonByID(services.get("dactyl:").addonID, function (addon) { // @DATE@ token replaced by the Makefile // TODO: Find it automatically options.setPref("extensions.dactyl.version", addon.version); dactyl.version = addon.version + " (created: @DATE@)"; });
items(Models.Yahoo.katakana).forEach(function(pair){ var val = pair[1]; if(Array.isArray(val)) Models.Yahoo.lengthMap[pair[0]] = val.length; });
tags : getTags('yourtags').map(function(tag){ return { name : tag, frequency : -1 } })
items(Models.Yahoo.katakana).forEach(function(pair){ var val = pair[1]; if(Array.isArray(val)) Models.Yahoo.lengthMap[pair[0]] = val.length;});
d.addCallback(function(res) {
return request(url).addCallback(function(res) {
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('//form[@action="/bookmarklet/account/login"]', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } });
if($X('descendant::ul[contains(concat(" ",normalize-space(@class)," ")," error ")]', doc)[0]){ throw new Error('Error posting entry.'); } else if($X('
var form = $X(' if(form.action === '/bookmarklet/account/login'){
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('//form[@action="/bookmarklet/account/login"]', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } });
} else { return formContents(form);
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('//form[@action="/bookmarklet/account/login"]', doc)[0]){ throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); } });
setTimeout(function () { let extensionName = config.name.toUpperCase(); let init = services.get("environment").get(extensionName + "_INIT"); let rcFile = io.getRCFile("~"); if (liberator.commandLineOptions.rcFile) { let filename = liberator.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); } else { if (init) liberator.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else liberator.log("No user RC file found", 3); } if (options["exrc"] && !liberator.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (liberator.commandLineOptions.rcFile == "NONE" || liberator.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) liberator.loadPlugins(); for (let option in options) { if (option.name != "encoding" && option.setter) option.value = option.value; } if (liberator.commandLineOptions.postCommands) liberator.commandLineOptions.postCommands.forEach(function (cmd) { liberator.execute(cmd); }); liberator.triggerObserver("enter", null); autocommands.trigger(config.name + "Enter", {}); }, 0);
liberator.commandLineOptions.preCommands.forEach(function (cmd) { liberator.execute(cmd); });
setTimeout(function () { let extensionName = config.name.toUpperCase(); let init = services.get("environment").get(extensionName + "_INIT"); let rcFile = io.getRCFile("~"); if (liberator.commandLineOptions.rcFile) { let filename = liberator.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); // let io.source handle any read failure like Vim } else { if (init) liberator.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else liberator.log("No user RC file found", 3); } if (options["exrc"] && !liberator.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (liberator.commandLineOptions.rcFile == "NONE" || liberator.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) liberator.loadPlugins(); // after sourcing the initialization files, this function will set // all gui options to their default values, if they have not been // set before by any RC file for (let option in options) { // 'encoding' option should not be set at this timing. // Probably a wrong value is set into the option, // if current page's encoging is not UTF-8. if (option.name != "encoding" && option.setter) option.value = option.value; } if (liberator.commandLineOptions.postCommands) liberator.commandLineOptions.postCommands.forEach(function (cmd) { liberator.execute(cmd); }); liberator.triggerObserver("enter", null); autocommands.trigger(config.name + "Enter", {}); }, 0);
function () { Buffer.scrollToPercent(body(), null, 0); })
function () { body().scrollTop = body().scrollHeight; })
function () { Buffer.scrollToPercent(body(), null, 0); })
autocommands.trigger(config.name + "Enter", {});
autocommands.trigger("Enter", {});
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(filename).path, false); // let io.source handle any read failure like Vim } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); // after sourcing the initialization files, this function will set // all gui options to their default values, if they have not been // set before by any RC file for (let option in options) { // 'encoding' option should not be set at this timing. // Probably a wrong value is set into the option, // if current page's encoging is not UTF-8. if (option.name != "encoding" && option.setter) option.value = option.value; } if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); dactyl.triggerObserver("enter", null); autocommands.trigger(config.name + "Enter", {}); }, 0);
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(filename).path, false); } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); for (let option in options) { if (option.name != "encoding" && option.setter) option.value = option.value; } if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0);
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(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(filename).path, false); // let io.source handle any read failure like Vim } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); // after sourcing the initialization files, this function will set // all gui options to their default values, if they have not been // set before by any RC file for (let option in options) { // 'encoding' option should not be set at this timing. // Probably a wrong value is set into the option, // if current page's encoging is not UTF-8. if (option.name != "encoding" && option.setter) option.value = option.value; } if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0);
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).path, false); } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); for (let option in values(options.needInit)) try { if (option.name != "encoding"); option.value = option.value; } catch (e) { dactyl.reportError(e); } if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0);
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(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).path, false); // let io.source handle any read failure like Vim } else { if (init) dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else dactyl.log("No user RC file found", 3); } if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) dactyl.loadPlugins(); // after sourcing the initialization files, this function will set // all gui options to their default values, if they have not been // set before by any RC file for (let option in values(options.needInit)) // FIXME: // 'encoding' option should not be set at this timing. // Probably a wrong value is set into the option, // if current page's encoging is not UTF-8. try { if (option.name != "encoding"); option.value = option.value; } catch (e) { dactyl.reportError(e); } if (dactyl.commandLineOptions.postCommands) dactyl.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.execute(cmd); }); dactyl.triggerObserver("enter", null); autocommands.trigger("Enter", {}); }, 0);
return request('http: if(res.responseText.indexOf('login_form')!=-1) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); var doc = createHTML(res.responseText); return formContents($X('id("addbookmark")/descendant::div[contains(concat(" ",normalize-space(@class)," ")," bd ")]', doc)[0]); }).addCallback(function(fs){
}).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) } }); });
return request('http://bookmarks.yahoo.co.jp/action/post').addCallback(function(res){ if(res.responseText.indexOf('login_form')!=-1) throw new Error(chrome.i18n.getMessage('error_notLoggedin', self.name)); var doc = createHTML(res.responseText); return formContents($X('id("addbookmark")/descendant::div[contains(concat(" ",normalize-space(@class)," ")," bd ")]', doc)[0]); }).addCallback(function(fs){
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);else if(typeof j==="string"){j=j.replace(db,hb);var o=(Ha.exec(j)||["",""])[1].toLowerCase(),p=G[o]||G._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+j+p[2];n--;)i=i.lastChild;
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
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);else if(typeof j==="string"){j=j.replace(db,hb);var o=(Ha.exec(j)||["",""])[1].toLowerCase(),p=G[o]||G._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+j+p[2];n--;)i=i.lastChild;
util.timeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
dactyl.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.execute(cmd); });
util.timeout(function () { dactyl.help(); options.setPref(firstTime, false); }, 1000);
}).addCallback(function(res){
})).forEach(function(pair) { var name = pair[0], value = pair[1]; if (!value) return; form[name] += value;
}).addCallback(function(res){ /* return map(function(s){ return ''+s.@title || ''+s; }, createXML(res.responseText).li.span); */ });
each(a, function() { vals.push(context.call("string", xpath.core.newNodeSet([this])).value); });
each(nodes, function() { vals.push(context.call("string", xpath.core.newNodeSet([this])).value); });
each(a, function() { vals.push(context.call("string", xpath.core.newNodeSet([this])).value); });
liberator.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 (liberator.commandLineOptions.rcFile) { let filename = liberator.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); } else { if (init) liberator.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else liberator.log("No user RC file found", 3); } if (options["exrc"] && !liberator.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } if (liberator.commandLineOptions.rcFile == "NONE" || liberator.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) liberator.loadPlugins(); for (let option in options) { if (option.name != "encoding" && option.setter) option.value = option.value; } if (liberator.commandLineOptions.postCommands) liberator.commandLineOptions.postCommands.forEach(function (cmd) {
liberator.commandLineOptions.postCommands.forEach(function (cmd) { liberator.execute(cmd); });
function () { body().scrollTop = body().scrollHeight; })
function () { dactyl.clipboardWrite(buffer.getCurrentWord(win())); });
function () { body().scrollTop = body().scrollHeight; })