G-osc ubiquity commands
From GOSC
g-osc ubiquity commands
gosc-resources
CmdUtils.CreateCommand({
names: ["gosc-resources"],
author: {name: "Ramy Wafa", email: "ramy.wafa@gmail.com"},
description: "Command used to open the resources of the gosc community",
execute: function(arguments)
{
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Links");
}
});
- Votes:
bespin
CmdUtils.CreateCommand({
names: ["bespin"],
icon: "http://www.mozilla.com/favicon.ico",
description: "used to open the mozilla Bespin to edit a specific project and a specific file where the project is the first argument and the file is the second argument.",
help: "bespin project file",
author: {name: "Mohamed Zakaria", email: "stealthyziko@gmail.com"},
license: "GPL",
homepage: "stealthyziko@blogger.com",
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function preview(pblock, args) {
pblock.innerHTML = "Your input is <b>" + args.object.html + "</b>.";
},
execute: function execute(args) {
var pars = args.object.text.split(" ");
Utils.openUrlInBrowser("https://bespin.mozilla.com/editor.html#project="+pars[0]+"&path="+pars[1]);
}
});
--Mohamed Zakaria 00:24, 22 October 2009 (UTC)
- Votes: --Khouly 02:20, 26 October 2009 (UTC)
g-osc-blogfinder
args = "";
names = [];
var block;
CmdUtils.CreateCommand({
names: ["blogfinder"],
icon: "http://www.mozilla.com/favicon.ico",
description: "Used to open the blog of the provided username",
author: {name: "Mostafa Magdi", email: "sasa20002003@gmail.com"},
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function preview(pblock, arguments) {
block = pblock;
args = arguments;
jQuery.get("http://se.bigbuddysociety.net/moonmoon/custom/people.opml",view);
},
execute: function execute(arguments)
{
args = arguments;
if(names.length == 1)
jQuery.get("http://se.bigbuddysociety.net/moonmoon/custom/people.opml",go);
}
});
function go(data) {
userName = args.object.text;
var re = new RegExp( userName, "i" );
s = $(data).find("outline").each(function()
{
temp = ($(this).attr("text")).toLowerCase();
if(re.test($(this).attr("text")))
{
displayMessage("Loading Blog: " + names[0]);
Utils.openUrlInBrowser($(this).attr("htmlUrl"));
}
});
}
function view(data){
names = [];
userName = args.object.text;
var re = new RegExp( userName, "i" );
s = $(data).find("outline").each(function()
{
if(re.test($(this).attr("text")))
names.push($(this).attr("text"));
});
block.innerHTML = "<ul>";
for(var i in names)
block.innerHTML += "<li>"+names[i]+"</li>";
block.innerHTML += "</ul>";
//CmdUtils.setSelection(names);
}
--User: Mostafa Magdi 19:05, 19 October 2009 (UTC)
- Votes:Antonious Mamdouh Shafik --Saher 06:08, 26 October 2009 (UTC)
- Votes: --Ramy 06:54, 26 October 2009 (UTC)
- Votes: --Mohamed Zakaria 08:17, 26 October 2009 (UTC)
- Votes: --Ahmed-Yasser 16:20, 1 November 2009 (UTC)
--Omarroushdy 09:26, 26 October 2009 (UTC) --Mirna Bouchra 11:27, 26 October 2009 (UTC)
--Baher 09:58, 26 October 2009 (UTC)
--Sarah Nagaty 09:38, 26 October 2009 (UTC)
--Hassan 20:57, 1 November 2009 (UTC)
--Abdurrahman 14:14, 2 November 2009 (UTC)
g-osc-ToDoList
CmdUtils.CreateCommand({
names: ["GOSC-ToDoList"],
description: "Used to open the To Do List on g-osc wiki ",
author: {name: "Mina Tadros", email: "teedo4ever@hotmail.com"},
execute: function(arguments)
{
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=To-Do");
}
});
--User: Mina Tadros 18:25, 18 October 2009 (UTC)
- Votes:
g-osc-check-scores
CmdUtils.CreateCommand({
names: ["g-osc-check-scores","g-osc-score","g-osc-scores"],
homepage: "http://minametias.blogspot.com/",
help:"Gets you the current G-OSC scores ",
author: { name: "Mina Metias", email: "mina.metias@live.com"},
description: "Just type in g-osc-check-scores and the current scores standings will be displayed,without even the need to open the page itself",
preview: function scores_preview(pblock) {
pblock.innerHTML = _("Please wait until scores are displayed...");
CmdUtils.previewGet(pblock, "http://se.bigbuddysociety.net/wiki/index.php?title=Special:ContributionScores", function (htm) {
pblock.innerHTML = htm;
});
},
execute: function(arguments)
{
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Special:ContributionScores");
}
})
Screenshot of the ubiquity command: [1]
--User:Mina Metias 05:46, 19 October 2009 (UTC)
- Votes:Muhammad Moustafa
g-osc-last-update-page
CmdUtils.CreateCommand({
names: ["g-osc-last-update-page","last-updated","g-osc-latest"],
description: "Shows the last updated page on g-osc wiki ",
author: {name: "Sarah Nagaty", email: "sarah.nagaty@gmail.com"},
preview: function preview(pblock, args) {
pblock.innerHTML = "Press enter to enable command" ;
},
execute: function execute(args) {
$.ajax({
type: "GET",
url: "http://se.bigbuddysociety.net/wiki/api.php?action=query&list=recentchanges&rcprop=timestamp|title&rclimit=1",
dataType: "html",
success: function(xml)
{
var index1= xml.indexOf("title=");
var index2= xml.indexOf("timestamp");
displayMessage("Last Page Modified is: "+ xml.substring(index1+12,index2-7));
}
});
}
});
--Sarah Nagaty 18:45, 18 October 2009 (UTC)
- Votes: --Saher 06:15, 26 October 2009 (UTC)
--Hassan 20:56, 1 November 2009 (UTC)
gosc-latest post,
CmdUtils.CreateCommand({
names: ["g-osc latest post"],
description: "Posts the latest posts that were modified on g-osc ",
author: {name: "Antonious Mamdouh", email: "tonyxe123@hotmail.com"},
execute: function execute()
{
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/moonmoon");
}
});
--Antonious Shafik 18:25, 18 October 2009 (UTC)
- Votes:
g-osc search
CmdUtils.makeSearchCommand({
name: "g-osc-search",
url: "http://se.bigbuddysociety.net/wiki/index.php?search={QUERY}",
icon: "http://se.bigbuddysociety.net/wiki/images/c/c4/GOSC-Logo-135.png",
author: {name: "Mirna Ayman Bouchra", email: "mirna.bouchra@hotmail.com"},
description: "Searches g-osc for your words."
});
--User:Mirna Bouchra 23:44, 18 October 2009 (UTC)
- Votes:
g-osc add-ref
var noun_type_tab = {
label: "get reference from tab Name",
// Returns all tabs from all windows.
getTabs: function nt_tab_getTabs() {
return [tab
for each (win in Application.windows)
for each (tab in win.tabs)];
},
suggest: function nt_tab_suggest(text, html, callback, selectionIndices) {
var textLC = text.toLowerCase();
return [CmdUtils.makeSugg(tab.document.title, null)
for each (tab in this.getTabs())
if (~tab.document.title.toLowerCase().indexOf(textLC))];
}
};
CmdUtils.CreateCommand({
names: ["g-osc add-ref"],
author: {name: "Muhammad Moustafa", email: "muhammad88@gmail.com"},
description: "insert reference onto the page at the location of the cursor where u specify the name of an opened tab.",
arguments: [{role: "object",
nountype: noun_type_tab}],
execute: function tab_execute(args) {
var tabName = args.object.text;
var matches = {};
matches=Utils.tabs.search(tabName);
displayMessage("added");
var reference = "<ref>" + matches[0].document.URL.toString() + "</ref>";
CmdUtils.setSelection(reference);
},
});
Muhammad 22:38, 18 October 2009 (UTC)
- Votes:--Saher 06:18, 26 October 2009 (UTC)
g-osc user page
CmdUtils.CreateCommand({
name: "GOSC-UserPage",
arguments: [{role: "object",
nountype: noun_arb_text,
label: "User"}],
author: { name: "Ahmed-Yasser", email: "yasser.fadl@gmail.com"},
description: "Go to Users Profile Page. First Edition",
help: "Enter your friends name to view his current profile on the GOCS wiki.",
execute: function(arguments)
{
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=User:"+arguments.object.text);
}
})
- Votes:
g-osc user talk
Note: Would like to add a preview of the actual text inside the user talk page to Ubiquity. Will carry that out later on.
CmdUtils.CreateCommand
(
{
name: "GOSC-UserTalk",
arguments: [{role: "object", nountype: noun_arb_text, label: "User Talk"}],
description: "Go to the user's talk page.",
help: "Type in the user's name after the command to view his/her user talk page",
author: { name: "Shehab ElNoury", email: "shehab.elnoury@gmail.com"},
execute: function(arguments)
{
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=User_talk:"+arguments.object.text);
var talkPage = arguments.object.text;
displayMessage("You are now on "+talkPage+"'s talk page!");
}
}
)
- Votes:
g-osc post issue
var destinationUrl = "http://se.bigbuddysociety.net/wiki/index.php";
var GOSC_USERS = [];
var typeMap = {"New Feature":"t_fea","Improvement":"t_imp","Doc":"t_doc","Feedback":"t_fee","Test":"t_tes","Idea":"t_idea"};
function getGOSCUsers()
{
GOSC_USERS = [];
jQuery.ajax({
type: "get",
url: destinationUrl,
data: {
bt_action: "add",
bt_project: "Community Tracker",
title: "Community_tracker"
},
error: function() {
displayMessage("failed to get users");
},
success: function(data_response) {
jQuery(data_response).find("#bt_assignee").children().each(function(i,e){
var val = jQuery(e).attr("value");
GOSC_USERS.push(val);
});
}
});
}
var noun_type_gosc_user = {
suggest: function nt_song_suggest(text) {
if(GOSC_USERS.length==0)
getGOSCUsers();
ret = [CmdUtils.makeSugg(text)];
for(var i in GOSC_USERS)
if(GOSC_USERS[i].toLowerCase().indexOf(text.toLowerCase())!=-1)
ret.push(CmdUtils.makeSugg(GOSC_USERS[i],GOSC_USERS[i],GOSC_USERS));
return ret;
},
label: "Assignee"
};
CmdUtils.CreateCommand({
names: ["pissue","g-osc post issue"],
description: "Posts an issue in the g-osc issue tracker (release candidate)",
author: {name: "Saher Mohamed El-Neklawy", email: "saher.neklawy@gmail.com"},
arguments: {object_Title:noun_arb_text,
goal_Assignee:noun_type_gosc_user,
alias_Type:["New Feature","Improvement","Doc","Feedback","Test","Idea"],
//alias_Status:["New","Assigned","Resolved","Closed"]
},
preview: function p( pblock, args) {
CmdUtils.log("in preview function. Number of cached users:"+GOSC_USERS.length);
pblock.innerHTML = "<h2>List of Users</h2>"+((GOSC_USERS.length==0)?"<h3> Loading ... </h3><h4>If not logged in, please login to the wiki.</h4>":"<ul>");
if(GOSC_USERS.length==0)
{
CmdUtils.log("asking for user list");
getGOSCUsers();
}
else
{
for(var i in GOSC_USERS)
{
pblock.innerHTML += "<li>"+GOSC_USERS[i]+"</li>";
}
pblock.innerHTML += "</ul>";
}
},
//icon:"http://se.bigbuddysociety.net/wiki/images/c/c4/GOSC-Logo-135.png",
execute: function execute(args) {
displayMessage("Posting Issue");
var destinationParams = {
bt_action: "add",
bt_project: "Community Tracker",
title: "Community_tracker",
bt_title: args.object.text,
bt_summary: args.object.text+" summary",
bt_type: typeMap[args.alias.text],
bt_status: "s_new",
bt_assignee: args.goal.text,
bt_submit:"Submit"
};
jQuery.ajax({
type: "post",
url: destinationUrl,
data: destinationParams,
error: function() {
displayMessage("Failed to submit new issue");
},
success: function(data_response) {
displayMessage("issue posted successfully");
}
});
}
});
--Saher 13:17, 16 October 2009 (UTC)
- Votes: --Mohamed Zakaria 20:38, 25 October 2009 (UTC)
- Votes: --Ramy 06:53, 26 October 2009 (UTC)
- Votes: --Mostafa Magdi 06:53, 26 October 2009 (UTC)
- Votes:--Antonious Shafik 15:18, 2 November 2009 (UTC)
goscaltodo
As this "need" appeared in one of the sessions of the course, here is a command that directly adds deadlines to your google calendar just by specifying the number of the week. Since parsing the actual to-do web page is only approach I could think of so far, the to-do list will have to follow a standard format.
- Bugs:
- The added event takes the current time as its start time
const GCalendar = "https://www.google.com/calendar/",
WIKI_URL = 'http://se.bigbuddysociety.net',
TODO_PAGE = "http://se.bigbuddysociety.net/wiki/index.php?title=To-Do";
CmdUtils.CreateCommand({
names: ["g-osc-caltodo","goscaltodo"],
description: "Adds the specified week's to-dos to your google calendar",
author: {name: "Muhammad Atef", email: "moodymusic@gmail.com"},
execute: function execute() {
var handler = function(html, textStatus) {
var args = "" + jQuery(html).find("#bodyContent").children('ul:last').text() + "\n===\nGenerated by goscaltodo v0.2";
var index = html.indexOf("(DEADLINE:");
var date = html.substring(index + 11, index + 21);
var arr = date.split("/"),
d = arr[0],
m = arr[1],
y = arr[2];
date = y + "-" + m + "-" + d;
/******************************************************************/
/* The following code is taken from the 'add to calender' command */
/******************************************************************/
var req = new XMLHttpRequest;
var event = args;
var authKey = Utils.getCookie(".www.google.com", "CAL");
var me = this;
function needLogin() {
me._say(_("Authorization error"),
_("Please make sure you are logged in to Google Calendar"));
}
if (!authKey) {
needLogin();
return;
}
req.open("POST", GCalendar + "feeds/default/private/full", false);
req.setRequestHeader("Authorization", "GoogleLogin auth=" + authKey);
req.setRequestHeader("Content-type", "application/atom+xml");
req.send(<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:gd="http://schemas.google.com/g/2005">
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>G-OSC ToDo List</title>
<gd:when startTime={date} endTime={date}></gd:when>
<content>{event}</content>
</entry>.toXMLString());
switch (req.status) {
case 201:
displayMessage("Event created");
Utils.tabs.reload(/^https?:\/\/www\.google\.com\/calendar\b/);
break;
case 401:
needLogin();
break;
default:
displayMessage("Error creating the event");
}
/****************************************************************/
};
jQuery.get(TODO_PAGE, {}, function(html) {
/* Chooses the last URL in the todo list page i.e.: the most recent week. */
var url = jQuery(html).find('#bodyContent').children('ul').children('li:last').children(':first').attr('href');
var req = jQuery.get(WIKI_URL + url, {}, handler);
});
}
});
--Atef
- Votes: --Saher 06:21, 26 October 2009 (UTC)
- Votes: --Ramy 06:48, 26 October 2009 (UTC)
- Votes: --Mohamed Zakaria 08:58, 26 October 2009 (UTC)
- Votes: -- Mina Metias 08:58, 26 October 2009 (UTC)
gosc-watsup
var GOSC_WATSUP_BASE_URL = 'http://se.bigbuddysociety.net';
var GOSC_WATSUP_TODO_PAGE = "http://se.bigbuddysociety.net/wiki/index.php?title=To-Do";
function gosc_watsup_go_to_page() {
jQuery.get(GOSC_WATSUP_TODO_PAGE, {}, function(html) {
var url = jQuery(html).find('#bodyContent').children('ul').children('li:last').children(':first').attr('href');
Utils.focusUrlInBrowser(GOSC_WATSUP_BASE_URL + url);
});
}
function gosc_watsup_preview_page(pblock) {
jQuery.get(GOSC_WATSUP_TODO_PAGE, {}, function(html) {
var url = jQuery(html).find('#bodyContent').children('ul').children('li:last').children(':first').attr('href');
jQuery.get(GOSC_WATSUP_BASE_URL + url, {}, function(html2) {
var innerHtml = '<h2>Latest TODO list</h2>';
temp=jQuery(html2).find('a').filter(function(index){
return jQuery(this).attr('name') == 'To_Do_List';
}).next().next();
innerHtml+="<ul>";
do
{
innerHtml+=jQuery(temp).html();
temp=jQuery(temp).next();
if(jQuery(temp).attr('name')!=null)break;
//alert(todo);
}
while((jQuery(temp).next().html())!=null)
innerHtml+="</ul>";
pblock.innerHTML=innerHtml;
});
});
}
CmdUtils.CreateCommand({
names: ["gosc-watsup"],
author: { name: "Abdallah El Guindy and Tarek Galal", email: "abdallah.elguindy@gmail.com"},
contributors: ["Tarek Galal"],
description: "Go to the latest TODO list page.",
execute: gosc_watsup_go_to_page,
preview: gosc_watsup_preview_page
})
Abdallah.elguindy 22:54, 18 October 2009 (UTC)
- Votes:--Khouly 02:24, 26 October 2009 (UTC)
--Ibrahim Mansour 09:00, 26 October 2009 (UTC)
g-osc-user-cont
function open_usercontributionspage(arguments) {
if(arguments.object.text!="")
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Special:Contributions/"
+ arguments.object.text);
else
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Main_Page");
}
CmdUtils.CreateCommand({
names: ["g-osc-user-cont"],
author: { name: "Mostafa ELkhouly", email: "mostafa-khouly@hotmail.com"},
description: "Go to the G-OSC User contributions page.",
arguments: [{role: "object", nountype: noun_arb_text,label: "Username"}],
execute: open_usercontributionspage,
icon: "http://se.bigbuddysociety.net/wiki/images/c/c4/GOSC-Logo-135.png",
preview: function (pblock){
pblock.innerHTML = "Go to the G-OSC User contributions page\t"
+ '<img src="http://se.bigbuddysociety.net/wiki/images/c/c4/GOSC-Logo-135.png"/>';}
})
--Khouly 03:52, 19 October 2009 (UTC)
- Votes:
g-osc-Upload
CmdUtils.CreateCommand({
names: ["g-osc-Upload","guosc"],
description: "Used to upload a file on g-osc wiki ",
author: {name: "Hassan Mohamed", email: "maradonah41@gmail.com"},
execute: function upload() {
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Special:Upload");
}
});
--Hassan 04:41, 19 October 2009 (UTC)
- Votes:
g-osc-Google-Search
To be able to search our community fast using Google engine power also with the ability to preview
CmdUtils.CreateCommand({
names: ["gsearch"],
icon: "http://www.mozilla.com/favicon.ico",
description: "Search any think on our Wiki with Preview.",
help: "Search any think on our Wiki with Preview",
author: {
name: "Mohamed Azab",
email: "3azzab@gmail.com"
},
license: "G-OSC BL",
homepage: "http://bigbuddy-me.com/3azzab/",
arguments: [{
role: 'object',
nountype: noun_arb_text
}],
preview: function preview(pblock, args) {
var searchTerm = args.object.text;
var siteHost = "se.bigbuddysociety.net / wiki ";
var query = "site: " + siteHost + "" + searchTerm;
if (searchTerm.length < 1) {
pblock.innerHTML = _("Searches G-OSC using Google for your words.");
return;
}
var url = "http://ajax.googleapis.com/ajax/services/search/web";
var params = {
v: "1.0",
q: query
};
CmdUtils.previewGet(pblock, url, params,
function(data) {
var numToDisplay = 3;
var results = data.responseData.results.splice(0, numToDisplay);
for (var i = 0; i < results.length; i++) {
var result = results[i];
result.key = i + 1;
}
var noResultsMessage = _("Your search - ${searchTerm} - did not match any documents.",
{
searchTerm: searchTerm
});
var tipsMessage = _("Tip: You can go to any result in this preview by pressing control, alt, and the result number at the same time.");
pblock.innerHTML = CmdUtils.renderTemplate(
feed.dom.getElementById("google-search").innerHTML,
{ results:results,
searchTerm:searchTerm,
noResultsMessage:noResultsMessage,
tipsMessage:tipsMessage
});
}, "json");
},
execute: function execute(args) {
var siteHost = "se.bigbuddysociety.net / wiki ";
//doc.location.host;
var query = "site: " + siteHost + "" + args.object.text;
var urlString = "http://www.google.com/search?q=" + query;
Utils.openUrlInBrowser(urlString);
displayMessage("You selected: " + args.object.text, this);
}
});
Preview is not working well I have another idea to implement
--Azab1987 07:08, 19 October 2009 (UTC)
- Votes:
g-osc-Comm-Humor
function CommH()
{
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Community_humor");
}
CmdUtils.CreateCommand({
names: ["g-osc-community-humor"],
description: "To open the Community humor in a new tab",
author: {name: "Omar Roushdy", email: "ouzizo@gmail.com"},
execute: CommH
});
--Omarroushdy 09:48, 19 October 2009 (UTC)
- Votes:
g-osc-Signture
CmdUtils.CreateCommand({
name: "Sign",
execute: function() {
var date = new Date();
CmdUtils.setSelection( "--"+'\n'+"Yours,"+'\n'+"Mostafa Sheshtawy"+'\n'+"Software Engineer"+'\n'+" "+'\n'+"Big Buddy"+'\n'+"www.bigbuddy-me.com"+'\n'+" "+'\n'+"Mail:mostafaa.sheshtawy@gmail.com"+'\n'+"Mobile:0104601814");
}
})
CmdUtils.CreateCommand({
name: "shortSign",
execute: function() {
var date = new Date();
CmdUtils.setSelection( "--"+'\n'+"Yours,"+'\n'+"Mostafa Sheshtawy"+'\n'+"Software Engineer");
}
})
I'll make it take name and organization as an input.
- Votes:
g-osc-Favourite-OS
redirect you to download ubuntu
CmdUtils.CreateCommand({
name: "Getubuntu",
execute: function() {
Utils.openUrlInBrowser("http://releases.ubuntu.com/releases/9.10/");
}
})
and shows the local html page .. has a countdown for ubuntu, don't forget to change the Path to make it work. Can't upload the page for some reason
CmdUtils.CreateCommand({
name: "ubuntu",
execute: function() {
Utils.openUrlInBrowser("file:///C:/Users/Mostafa/Desktop/pages.html");
}
})
g-osc-projects
CmdUtils.CreateCommand({
name: " g-osc-projects",
author: {name: "Muaz Al-Jarhi", email: "ThePowerfulAvatar@gmail.com"},
description: "gets the featured projects of the g-osc community",
execute: function(Arguments) {
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=OpenSource-Projects");
},
});
- Votes:
g-osc-recent-changes
CmdUtils.CreateCommand({
names: ["gosc-recent-changes"],
description: "Gets the latest major changes made by other members in the GOSC community.",
author: {
name: "Abdurrahman Ahmed",
email: "a.hammamy@gmail.com",
},
arguments: [],
execute: function execute(args) {
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Special:RecentChanges&hidemyself=1&hideminor=1");
},
});
--Abdurrahman 21:08, 19 October 2009 (UTC)
- Votes:
g-osc-watch
CmdUtils.CreateCommand({
names: ["gosc-watch"],
icon: "http://www.mozilla.com/favicon.ico",
description: "Watch / Unwatch a mediawiki page, show the watch list or recent changes.",
help: "gosc-watch / gosc-watch stop / gosc-watch list / gosc-watch recent",
author: {name: "Mohamed Abdel-Fattah", email: "mohamedafattah@gmail.com"},
license: "GPL",
homepage: "http://se.bigbuddysociety.net/wiki/",
arguments: [{role: 'object', nountype: noun_arb_text}],
execute: function execute(args) {
if (args.object.text == "") {
Application.activeWindow.activeTab.document.location.href = CmdUtils.getWindow().location + "&action=watch";
win.location.reload(true);
} else if (args.object.text == "stop") {
Application.activeWindow.activeTab.document.location.href = CmdUtils.getWindow().location + "&action=unwatch";
win.location.reload(true);
} else if (args.object.text == "recent") {
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Special:RecentChanges");
} else if (args.object.text == "list") {
Utils.openUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Special:Watchlist");
}
}
});
- Votes:
g-osc-todo
CmdUtils.CreateCommand({
names: ["g-osc-todo", "todo"],
author: { name: "Majid Serag El-Din", email: "majid.serag@gmail.com"},
description: "Sends you to the desired to do list.",
arguments: [{role: "number", nountype: noun_arb_text}],
preview: "Can haz give todo list??? kthx.",
execute: function do(arguments)
{
if(arguments.number.text == "1")
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Introductory_Meeting#To_Do_List");
else
if(arguments.number.text == "2")
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Second_Meeting_-_Revision_Control#To_Do_List");
else
if(arguments.number.text == "3")
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=Build_Automation#To_Do_List");
else
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/wiki/index.php?title=To-Do");
}
})
Just found out Atef did something similar. :) --Majid Hassan 23:15, 19 October 2009 (UTC)
- Votes:
g-osc-planet
Opens the community planet page. Shows preview of the last post on the planet.
CmdUtils.CreateCommand({
names: ["g-osc-planet", ],
description: "Go to the community planet page of G-OSC. Show preview of last post.",
author: { name: "Baher", email: "bahersabry@hotmail.com" },
preview: function(pblock) {
pblock.innerHTML = "<h3>Go to the community planet page of G-OSC.</h3>";
jQuery.get("http://se.bigbuddysociety.net/moonmoon/", {},
function (html) {
lastDiv = jQuery(html).find("div#content").children("div")[0];
pblock.innerHTML += "<p style='color: red'>The following is the last post: </p>";
pblock.appendChild(lastDiv);
})
},
execute: function() {
Utils.focusUrlInBrowser("http://se.bigbuddysociety.net/moonmoon/");
}
})
-- Baher
- Votes:

