Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Turkce Ubiquity Komutlarim
//GOOGLE AKADEMIK
var noun_type_article = {
_name: "article title",
suggest: function( text, html ) {
var suggestions = [CmdUtils.makeSugg(text)];
return suggestions;
}
}
CmdUtils.CreateCommand({
names: ["scholar","akademik"],
icon: "http://www.google.com/favicon.ico",
homepage: "http://static.isnotworking.com/scholar-search.html",
author: { name: "Ricardo Niederberger Cabral", email: "ricardo@isnotworking.com"},
license: "MPL",
help: "Searches Google Scholar for articles",
arguments: [{role:'object', nountype: noun_type_article, label:'keywords'}],
preview: function(pblock, args) {
searchText = jQuery.trim(args.object.text);
if(searchText.length < 1) {
pblock.innerHTML = "Searches Google Scholar for articles";
return;
}
var previewTemplate = "<b>${query}</b> kelimesini içeren makaleler için Google Akademik de arama yapar.";
var previewData = {query: searchText};
pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData);
},
execute: function(args) {
var url = "http://scholar.google.com/scholar?q={QUERY}"
var query = args.object.text;
var urlString = url.replace("{QUERY}", query);
Utils.openUrlInBrowser(urlString);
}
});
// türkçe altyazı
CmdUtils.makeSearchCommand({
name: "türkçe altyazı",
url: "http://www.turkcealtyazi.org/find.php?cat=sub&find={QUERY}",
});
////////////////////////////////////////////////////////////////
///
/// GENEL KOMUTLAR
///
// generated by create search command
CmdUtils.makeSearchCommand({
name: "altyazı",
url: "http://divxplanet.com/index.php?page=arama",
icon: "http://divxplanet.com/favicon.ico",
description: "Verilen film-dizi için divxplanet.com da arama yapar. Eğer sonuç çıkmazsa galtyazı komutunu deneyin.",
charset: "ISO-8859-9",
postData: "arama={QUERY}&src_select=%2Findex.php%3Fpage%3Darama",
preview: function preview(pblock, args) {
pblock.innerHTML = args.object.html.bold() + " için divxplanet.com da arama yapar.<hr> Eğer sonuç çıkmazsa <u><b>galtyazı</b></u> komutunu deneyin.";
},
});
// generated by create search command
CmdUtils.makeSearchCommand({
name: "galtyazı",
icon: "http://divxplanet.com/favicon.ico",
help: "Verilen film-dizi için divxplanet.com da daha kapsamlı arama yapar.",
description: "Verilen film-dizi için divxplanet.com da daha kapsamlı arama yapar.",
url: "http://divxplanet.com/cse.php?cx=009015947334585847211%3A6djglhionb4&ie=ISO-8859-9&oe=ISO-8859-9&cof=FORID%3A9&hl=tr&q={QUERY}",
charset: "ISO-8859-9",
preview: function preview(pblock, args) {
pblock.innerHTML = args.object.html.bold() + " için divxplanet.com da google yardımıyla arama yapar.";
},
});
CmdUtils.CreateCommand({
author: { name: "Aman Bhatia", email: "amanatiitATgmail.com"},
// paint ve notepad için yapmış olduğu komutu düzenledim.-ayhan515
license: "MPL",
description: _("Windowsda wordu açar"),
name: ['word'],
arguments: [],
execute: function(args) {
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
var path = "C:\\Program Files\\Microsoft Office\\Office14\\WINWORD.exe";
var args = path.split(" ");
var executable = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
executable.followLinks = true;
executable.initWithPath(path);
if (executable.exists() && executable.isExecutable()) {
process.init(executable);
args.splice(0,1);
process.run(false, args , args.length);
} else {
displayMessage(args[0] + ' is not an executable- çalıştırılabilir değil');
}
},
preview: function(pblock, args) {
s = _("Office 2010-WORD programını açar.<br> Programın, C:\\Program Files\\Microsoft Office\\Office14\\WINWORD.exe konumunda olduğu varsayılarak hazırlanmıştır.") + "<br>";
pblock.innerHTML = CmdUtils.renderTemplate(s);
}
})
CmdUtils.CreateCommand({
author: { name: "Aman Bhatia", email: "amanatiitATgmail.com"},
// paint ve notepad için yapmış olduğu komutu düzenledim.-ayhan515
license: "MPL",
description: _("Windowsda wordu açar"),
name: ['excel'],
arguments: [],
execute: function(args) {
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
var path = "C:\\Program Files\\Microsoft Office\\Office14\\EXCEL.exe";
var args = path.split(" ");
var executable = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
executable.followLinks = true;
executable.initWithPath(path);
if (executable.exists() && executable.isExecutable()) {
process.init(executable);
args.splice(0,1);
process.run(false, args , args.length);
} else {
displayMessage(args[0] + ' is not an executable- çalıştırılabilir değil');
}
},
preview: function(pblock, args) {
s = _("Office 2010-EXCEL programını açar.<br> Programın, C:\\Program Files\\Microsoft Office\\Office14\\EXCEL.exe konumunda olduğu varsayılarak hazırlanmıştır.") + "<br>";
pblock.innerHTML = CmdUtils.renderTemplate(s);
}
})
CmdUtils.CreateCommand({
author: { name: "Aman Bhatia", email: "amanatiitATgmail.com"},
// paint ve notepad için yapmış olduğu komutu düzenledim.-ayhan515
license: "MPL",
description: _("notepad++'ı açar"),
name: ['++','notepad++'],
arguments: [],
execute: function(args) {
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
var path = "C:\\Program Files\\Notepad++\\notepad++.exe";
var args = path.split(" ");
var executable = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
executable.followLinks = true;
executable.initWithPath(path);
if (executable.exists() && executable.isExecutable()) {
process.init(executable);
args.splice(0,1);
process.run(false, args , args.length);
} else {
displayMessage(args[0] + ' çalıştırılabilir değil');
}
},
preview: function(pblock, args) {
s = _("Notepad++'ı programını açar.<br> Programın, C:\\Program Files\\Notepad++\\notepad++ konumunda olduğu varsayılarak hazırlanmıştır.") + "<br>";
pblock.innerHTML = CmdUtils.renderTemplate(s);
}
})
// generated by create search command
CmdUtils.makeSearchCommand({
name: "avax",
author: {
name: "ayhan515-ayhan eses",
email: "paylasimlarimiz@gmail.com",
homepage: "http://tr-firefox.blogspot.com/",
},
help: "avaxhome sitesinden kitap arayabilirsiniz.",
url: "http://avaxsearch.com/avaxhome_search?q={QUERY}&a=author&c=&l=&sort_by=",
preview: function preview(pblock, args) {
pblock.innerHTML = args.object.html.bold() + " kitabını/dergisini avaxhome sitesinden arar.";
},
});
// generated by create search command
CmdUtils.makeSearchCommand({
names: ["gigapedia", "library.nu"],
author: {
name: "ayhan515-ayhan eses",
email: "paylasimlarimiz@gmail.com",
homepage: "http://tr-firefox.blogspot.com/",
},
help: "library.nu (gigapedia) sitesinden kitap arayabilirsiniz.",
url: "http://library.nu/search?q={QUERY}",
preview: function preview(pblock, args) {
pblock.innerHTML = args.object.html.bold() + " kitabını/dergisini library.nu (gigapedia) sitesinden arar.";
},
});
// generated by Arama komutu oluştur
CmdUtils.makeSearchCommand({
name: "vimeo",
url: "http://vimeo.com/videos/?search={QUERY}&token=d0ff1ed2f20cb9aaaeb0c7a5379b724c",
});
// generated by create search command
CmdUtils.makeSearchCommand({
name: "eksi",
url: "http://www.eksisozluk.com/show.asp?t={QUERY}",
});
// generated by create search command
CmdUtils.makeSearchCommand({
names: ["ktunnel", "proksi", "proxy"],
author: {
name: "ayhan515-ayhan eses",
email: "paylasimlarimiz@gmail.com",
homepage: "http://tr-firefox.blogspot.com/",
},
help: "komutu yazıp bir boşluk bırakarak bir web sitesi adresi yazın veya kopyalayın"
+ "<br><br>" +"yazılan web adresini ktunnel-proksi-üzerinden yeni bir sekmede açar."+ "<br>" +"Örneğin"+ "<br>" +"ktunnel http://www.youtube.com/"+ "<br>" +"proksi http://www.youtube.com/",
url: "http://ktunnel.com/index.php/1010110A/e30d31331557200b1b3233484d15714",
charset: "ISO-8859-9",
postData: "username={QUERY}&r4=%20checked&rs=on&fa=&br=on&if=on",
preview: function preview(pblock, args) {
pblock.innerHTML = args.object.html.bold() + " web adresini ktunnel-proksi-üzerinden yeni bir sekmede açar." + "<hr><br>" +"Örneğin"+ "<br>" +"ktunnel http://www.youtube.com/"+ "<br>" +"proksi http://www.youtube.com/"
},
});
CmdUtils.makeSearchCommand({
name: "tureng",
icon: "http://www.tureng.com/favicon.ico",
description: "Verilen kelime için tureng içinde arama yapar.",
url: "http://www.tureng.com/search/{QUERY}",
preview: function preview(pblock, args) {
pblock.innerHTML = args.object.html.bold() + "için tureng.com sitesinde arama yapar.";
},
});
(function ToggleCommand(names, desc, nt, disabled, tmpl) {
CmdUtils.CreateCommand({
names: names,
icon: "chrome://ubiquity/skin/icons/favicon.ico",
description: desc,
argument: nt,
execute: function xable_cmd_execute({object: {text, data: cmd}}) {
if (cmd) {
cmd.disabled = disabled;
displayMessage(text, this);
}
},
preview: function xable_cmd_preview(pb, {object: {html, data: cmd}}) {
pb.innerHTML = (
cmd
? (CmdUtils.renderTemplate(tmpl, {name: "<b>" + html + "</b>"}) +
"<hr/>" + cmd.previewDefault())
: this.description);
}
});
return ToggleCommand;
})
(["disable command"],
("Disables a Ubiquity command, so that it will no longer " +
"show up in the suggestion list."),
noun_type_enabled_command,
true,
_("Disables ${name}."))
(["enable command"],
"Re-enables a Ubiquity command that you disabled.",
noun_type_disabled_command,
false,
_("Enables ${name}."));
bingcommand("googletr", "", "", "http://www.google.com.tr/search?q=", "");
bingcommand("ara", "", "favicon.ico", "http://www.google.com.tr/search?q=", "");
bingcommand("vikipedia", "tr.wikipedia.org", "", "http://tr.wikipedia.org/w/index.php?title=%C3%96zel%3AAra&search=", "");
bingcommand("dailymotion", "www.dailymotion.com", "http://www.dailymotion.com/favicon.ico", "http://www.dailymotion.com/?form_name=dm_pageitem_search&search=", "");
bingcommand("science", "www.sciencedirect.com", "http://www.sciencedirect.com/scidirimg/faviconSD.ico", "www.sciencedirect.com/science?_ob=QuickSearchURL&_method=submitForm&_acct=C000052536&md5=86d55c86c2fb86eb4eecf983f39a7d7e&qs_all=", "&qs_author=&qs_title=&qs_vol=&qs_issue=&qs_pages=", "");
bingcommand("turkboard", "www.turkboardmusic", "http://www.jquery.com/favicon.ico", "www.turkboardmusic.net/search.php?do=process&quicksearch=1&childforums=1&exactname=1&s=&securitytoken=1293203465-fd32a0eb13692d961be3344c3c3ba3c9b3ec6cee&query=", "&showposts=0", "");
bingcommand("avaxhome", "http://avaxsearch.com", "http://avaxsearch.com/favicon.ico", "http://avaxsearch.com/avaxhome_search?q=", "&a=author&c=&l=&sort_by=");
bingcommand("paylasimlarimiz", "http://paylasimlarimiz.blogspot.com", "http://duffrose.web.elte.hu/Download/icons/Stargate%20-%20nox.ico", "http://paylasimlarimiz.blogspot.com/?search=", "");
bingcommand("w3.org", "www.w3.org");
bingcommand("emacs", "emacswiki.org", "http://emacswiki.org/favicon.ico");
bingcommand("flex", "livedocs.adobe.com/flex/3", "http://livedocs.adobe.com/favicon.ico");
bingcommand("atr", "livedocs.adobe.com/flex/3", "chrome://ubiquity/skin/icons/google.ico");
function bingcommand(name, base, iconurl, nerde, sorgudevami) {
CmdUtils.CreateCommand(
{names: [name],
icon: (typeof iconurl == "undefined" ?
"chrome://ubiquity/skin/icons/google.ico" :
iconurl),
author: {name:"Orj:Marc Belmont-Düzenleme:ayhan515"},
description: base + " de arama yapar. " + "<br>" + "" + "<hr>" + "Marc Belmont 'un bing kodunu "
+ base + "'ye göre ayarladım. " + "<br>"
+ "Düzenleyen ayhan515-ayhan eses" + "<br>"
+ "email-paylasimlarimiz@gmail.com" + "<br>"
+ "homepage: http://tr-firefox.blogspot.com",
help: name + " ifadesi için arama yapar. n.sonucu açmak için Alt Gr+n'e basın. Örneğin, Alt Gr+2, 2.sonucu açacaktır."
+ "<br>" + " " + "<hr>" + "Marc Belmont 'un bing kodunu "
+ base +"'ye göre ayarladım. " + "<br>"
+ "Düzenleyen ayhan515-ayhan eses" + "<br>"
+ "email-paylasimlarimiz@gmail.com" + "<br>"
+ "homepage: http://tr-firefox.blogspot.com",
arguments: [{role:"object", label:"keywords", nountype: noun_arb_text}],
execute: function(args) {
Utils.openUrlInBrowser(nerde +
encodeURIComponent(args.object.text) + sorgudevami);
},
cache: {},
// sometime the ajax queries don't come back in order. This variable
// helps us make sure we display the last result.
lastrefresh: {time:0},
preview: function(out, args) {
var keywords = $.trim(args.object.text),
cache = this.cache;
lastrefresh = this.lastrefresh;
if (keywords in cache) {
out.innerHTML = cache[keywords];
return;
}
bingsearch(keywords, function(buf, data, time) {
if (lastrefresh.time > time) return;
lastrefresh.time = time;
out.innerHTML = buf;
cache[keywords] = buf;
}, base);
}});
}
function bingsearch(keywords, cb, base) {
base = (typeof base != "undefined" && base != null ?
"site:"+base+" " : "");
if (!keywords.length)
return cb("anahtar kelimelerinizi girin.", []);
$.getJSON(
"http://api.search.live.net/json.aspx?JsonCallback=?",
{Query: base + keywords,
"Web.Count":9,
AppId:"C616BF0FB34B57F01CDC2CB2D333D0741BCCF570",
Market:"en-US",
JsonType:"callback",
Sources:"Web RelatedSearch",
Adult:"Off",
Version:"2.2"},
// format the output
function(data) {
if (!data.SearchResponse.Web.Total)
return cb("bu arama için sonuç bulunamadı<br>", [], (new Date()).getTime());
var msg = data.SearchResponse.Web.Results;
var accesskey = 1;
// break the keywords into a list, quoted text count as 1 element
var keys = [];
keys = keys.concat(keywords.replace(/"(.*?)"/gi, function(s, m) {
keys.push(m);
return "";
}).split(" "));
// format each message into the template
var results = $.map(msg, function(x) {
if (!x) return "";
x.Title = (x.Title ? sanitize(x.Title) : "");
x.Description = (x.Description ? sanitize(x.Description) : "");
$.each(keys, function(i, key) {
if (key.length < 3) return;
x.Title = (x.Title ? colorize(key, x.Title) : "");
x.Description = (x.Description ? colorize(key, x.Description) : "");
});
// this avoids conflits with keywords
x.Title = x.Title.replace(/@@s/g, "<span style='color:#FFA500'>").
replace(/@@e/g, "</span>");
x.Description = x.Description.replace(/@@s/g, "<span style='color:#FFA500'>").
replace(/@@e/g, "</span>");
x.Domain = (base ? "":
(" <font color='#00BFFF'>"+
x.Url.match(/.*\/\/([a-z0-9.-]+).*/i)[1]+
"</font>"));
x.accesskey = accesskey++;
return CmdUtils.renderTemplate(
"<p><span style='background-color: #ccc; color: black; padding: 0 3px; margin: 5px;font-weight: bold; border: 1px solid #888;'>${accesskey}</span>"+
"<a accesskey='${accesskey}' style='text-decoration: none' "+
"href='${Url}'><span style='font-weight:bold'>${Title}</span>"+
"${Domain}<br>"+
"${Description}</a></p>", x);
}).join("");
// return the html
return cb(CmdUtils.renderTemplate(
"<p><b>${Total}</b> sonuç bulundu. İlgili aramalar: ${Related}</p>",
{Total:humanizednumber(data.SearchResponse.Web.Total, ","),
Related:data.SearchResponse.RelatedSearch ?
$.map(data.SearchResponse.RelatedSearch.Results.slice(0, 7),
function(x) { return "<i style='color: #32CD32;'>"+x.Title+"</i>"; }).join(" - "):
"sonuç yok."}
) + results, msg, (new Date()).getTime());
});
}
/////////////
// helpers //
/////////////
function trace(x) { CmdUtils.log(x); }
function sanitize(str) {
return str.replace("<", "&lt;").replace(">", "&gt;");
}
function colorize(key, str) {
var s = "+|{}()[].*?\\";
for (var i = 0; i < s.length; i++)
key = key.replace(s.charAt(i), "\\"+s.charAt(i));
key = key.replace(" ", "[ _,-]");
return str.replace(new RegExp(key, "gi"),
function(s) {
return "@@s"+s+"@@e"; })
}
function humanizednumber(n, sep) {
function reverse(s) {
return s.split("").reverse().join("");
}
return reverse(reverse(String(n)).match(/(\d{1,3})/gi).join(sep));
}
CmdUtils.makeSearchCommand({
name: "komut listesi",
icon: "chrome://ubiquity/skin/icons/application_view_list.png",
description: "ubiquity komut listesini açar.",
help: "ubiquity komut listesini ve komutları açıklar açar.",
url: "about:ubiquity?cmdlist",
});
CmdUtils.makeSearchCommand({
names: ["komut editörü","komut düzenle"],
icon: "chrome://ubiquity/skin/icons/plugin_edit.png",
description: "ubiquity komut editörünü açar.",
help: "ubiquity komut editörünü açar.",
url: "about:ubiquity?editor",
});
CmdUtils.makeSearchCommand({
names: ["ayarlar","ubiquity ayarları"],
icon: "chrome://ubiquity/skin/icons/favicon.ico",
description: "ubiquity komut editörünü açar.",
help: "ubiquity komut editörünü açar.",
url: "about:ubiquity?settings",
});
// generated by create search command
CmdUtils.makeSearchCommand({
names: ["pirate","torrent", "piratebay"],
url: "http://thepiratebay.org/s/?q={QUERY}&=on&page=0&orderby=99",
});
// generated by Arama komutu oluştur
CmdUtils.makeSearchCommand({
names: ["yükleresim","uploadimage"],
url: "http://imgcafe.com/view/",
postData: "remota={QUERY}&resize=&smail=&deleteimage=&tags=",
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.