2
// @include http://askubuntu.com/*
6
// Copyright (C) 2012 - 2013 Unity Shell
7
// <unityshellblog@gmail.com>
9
// This program is free software: you can redistribute it and/or modify
10
// it under the terms of the GNU General Public License as published by
11
// the Free Software Foundation, either version 3 of the License, or
12
// (at your option) any later version.
14
// This program is distributed in the hope that it will be useful,
15
// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
// GNU General Public License for more details.
19
// You should have received a copy of the GNU General Public License
20
// along with this program. If not, see <http://www.gnu.org/licenses/>.
21
// =====================================================================
23
var Unity = external.getUnityObject(1.0);
25
function unityReady() {
29
Unity.addAction('/Enlace1/', makeRedirector('http://www.sitio.com.uy/enlace1'));
30
Unity.addAction('/Enlace2/', makeRedirector('http://www.sitio.com.uy/enlace2'));
32
// Appindicator (contador)
33
//Unity.MessagingIndicator.showIndicator(_("Contador 1"), { count: 2, callback: function () {}});
34
//Unity.MessagingIndicator.showIndicator(_("Contador 2"), { count: 12, callback: function () {}});
35
//Unity.MessagingIndicator.showIndicator(_("Contador 3"), { count: 32, callback: function () {}});
38
Unity.Launcher.addAction("Consultas:", function() {
39
location.href = "http://askubuntu.com/questions?sort=newest"
41
Unity.Launcher.addAction("·· Nuevas preguntas", function() {
42
location.href = "http://askubuntu.com/questions?sort=newest"
44
Unity.Launcher.addAction("·· Respuestas con más puntaje", function() {
45
location.href = "http://askubuntu.com/questions?sort=featured"
47
Unity.Launcher.addAction("·· Respuestas más vistas", function() {
48
location.href = "http://askubuntu.com/questions?sort=frequent"
50
Unity.Launcher.addAction("·· Las más votadas", function() {
51
location.href = "http://askubuntu.com/questions?sort=votes"
53
Unity.Launcher.addAction("·· Con más actividad", function() {
54
location.href = "http://askubuntu.com/questions?sort=active"
56
Unity.Launcher.addAction("·· Sin responder", function() {
57
location.href = "http://askubuntu.com/questions?sort=unanswered"
60
Unity.Launcher.addAction("------------------------------------------", function() {
65
Unity.Launcher.addAction("Chat:", function() {
66
popup('http://chat.stackexchange.com/',1000,600);
68
Unity.Launcher.addAction("·· Salas más activas", function() {
69
popup('http://chat.stackexchange.com/?tab=all&sort=active',1000,600);
71
Unity.Launcher.addAction("·· Eventos", function() {
72
popup('http://chat.stackexchange.com/?tab=all&sort=event',1000,600);
74
Unity.Launcher.addAction("·· Salas con más integrantes", function() {
75
popup('http://chat.stackexchange.com/?tab=all&sort=people',1000,600);
77
Unity.Launcher.addAction("·· Salas nuevas", function() {
78
popup('http://chat.stackexchange.com/?tab=all&sort=created',1000,600);
81
Unity.Launcher.addAction("Usuarios:", function() {
82
popup('http://askubuntu.com/users',1000,600);
84
Unity.Launcher.addAction("·· Nuevos", function() {
85
popup('http://askubuntu.com/users?tab=newusers',1000,600);
87
Unity.Launcher.addAction("·· Con más votos", function() {
88
popup('http://askubuntu.com/users?tab=voters',1000,600);
90
Unity.Launcher.addAction("·· Con más reputación", function() {
91
popup('http://askubuntu.com/users?tab=reputation',1000,600);
94
Unity.Launcher.addAction("Insignias", function() {
95
popup('http://askubuntu.com/badges',1000,600);
97
//Unity.Launcher.addAction("·· Oro", function() {
98
//popup('http://askubuntu.com/badges?tab=general&filter=gold',1000,600);
100
//Unity.Launcher.addAction("·· Plata", function() {
101
//popup('http://askubuntu.com/badges?tab=general&filter=silver',1000,600);
103
//Unity.Launcher.addAction("·· Bronce", function() {
104
//popup('http://askubuntu.com/badges?tab=general&filter=bronze',1000,600);
110
// Función que abre Popups
111
//function popup(url,ancho,alto) {
114
// posicion_x=(screen.width/2)-(ancho/2);
115
// posicion_y=(screen.height/2)-(alto/2);
116
// window.open(url, "#", "width="+ancho+",height="+alto+",menubar=0,toolbar=0,directories=0,scrollbars=yes,resizable=no,left="+posicion_x+",top="+posicion_y+"");
119
function popup(URL) {
122
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 112,top = 0');");
125
Unity.init({ name: "Askubuntu",
126
domain: 'askubuntu.com',
127
homepage: 'http://askubuntu.com',
128
iconUrl: "http://ubuntuone.com/0T7vI7eMxer6d5a6yyOrFM",
129
onInit: wrapCallback(unityReady) });