~pablocapeluto/unity-webapps-proqpon/trunk

« back to all changes in this revision

Viewing changes to debian/unity-webapps-proqpon/usr/share/unity-webapps/userscripts/unity-webapps-proqpon/proqpon.user.js

  • Committer: Pablo Capeluto
  • Date: 2013-10-15 02:57:27 UTC
  • Revision ID: pcapeluto@gmail.com-20131015025727-8s0jkqqb9rnjes2t
  * Se agrega compatibilidad con Ubuntu 13.10
  * Retoque en ícono de la Webapp

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// ==UserScript==
 
2
// @include       http://www.proqpon.com
 
3
// @include       http://www.proqpon.com/*
 
4
// @require       utils.js
 
5
// ==/UserScript==
 
6
 
 
7
// Copyright (C) < 2012 - 2013 >  <Pablo Capeluto> <unityshellblog@gmail.com>
 
8
// 
 
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.
 
13
// 
 
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.
 
18
// 
 
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
// =====================================================================
 
22
 
 
23
var WebappsGettextDict = JSON.parse(unescape(
 
24
    "%7B%22GETTEXT%22%3A%22PLACEHOLDER%22%7D"
 
25
));
 
26
 
 
27
var Unity = external.getUnityObject(1.0);
 
28
 
 
29
function unityReady() {
 
30
        
 
31
         function addAction(name, uri) {
 
32
     var fullUri = 'http://' + window.location.hostname + '/' + uri
 
33
     Unity.Launcher.addAction(name, makeRedirector(fullUri))
 
34
     }
 
35
        
 
36
        // HUD  
 
37
    // Unity.addAction('/Enlace1/', makeRedirector('http://www.sitio.com.uy/enlace1'));
 
38
    // Unity.addAction('/Enlace2/', makeRedirector('http://www.sitio.com.uy/enlace2'));
 
39
    
 
40
    // Appindicator (contador)
 
41
    // Unity.MessagingIndicator.showIndicator(_("Contador 1"), { count: 2,  callback: function () {}});
 
42
    // Unity.MessagingIndicator.showIndicator(_("Contador 2"), { count: 12, callback: function () {}});
 
43
    // Unity.MessagingIndicator.showIndicator(_("Contador 3"), { count: 32, callback: function () {}});
 
44
        
 
45
        // QuickList's
 
46
        // Unity.Launcher.addAction("Nombre del enlce", function() {
 
47
    // location.href = "http://www.sitio.com.uy"
 
48
    // });
 
49
    
 
50
    addAction(_("Inicio"), './')  
 
51
    addAction(_("Categorías:"), '#')  
 
52
        addAction(_("··    Accesorios"), 'Vouchers/Categoria/16/accesorios')  
 
53
        addAction(_("··    Calzado"), 'Vouchers/Categoria/15/calzado')  
 
54
        addAction(_("··    Deportes"), 'Vouchers/Categoria/20/deportes')  
 
55
        addAction(_("··    Gastronomía"), 'Vouchers/Categoria/23/gastronomia')  
 
56
        addAction(_("··    Hogar y decoración"), 'Vouchers/Categoria/22/hogar-y-decoracion')  
 
57
        addAction(_("··    Indumentria femenina"), 'Vouchers/Categoria/13/indumentaria-femenina')  
 
58
        addAction(_("··    Indumentria masculina"), 'Vouchers/Categoria/14/indumentaria-masculina')  
 
59
        addAction(_("··    Niños"), 'Vouchers/Categoria/17/ninos')  
 
60
        addAction(_("··    Ópticas"), 'Vouchers/Categoria/18/opticas')
 
61
        addAction(_("··    Ópticas"), 'Vouchers/Categoria/21/varios')
 
62
 
 
63
    addAction(_("Cupones:"), '#')
 
64
    addAction(_("··    Ver todos"), 'Vouchers')
 
65
    addAction(_("··    Nuevos"), 'Vouchers/Nuevos')
 
66
    addAction(_("··    Más populares"), 'Vouchers/Populares')
 
67
    
 
68
    Unity.Launcher.addAction("------------------------------------------", function() {
 
69
    location.href = "#"
 
70
    });
 
71
 
 
72
    addAction(_("Descarga móvil:"), '#')
 
73
    
 
74
    Unity.Launcher.addAction("··    AppStore", function() {
 
75
    window.open("https://itunes.apple.com/es/app/proqpon/id690917164?ls=1&mt=8",
 
76
                                '_blank','location=1,statusbar=0,menubar=0,resizable=1,width=800,height=550')
 
77
    });
 
78
    Unity.Launcher.addAction("··    GooglePlay", function() {
 
79
    window.open("https://play.google.com/store/apps/details?id=com.proqpon.app&hl=es",
 
80
                                '_blank','location=1,statusbar=0,menubar=0,resizable=1,width=800,height=550')
 
81
    });
 
82
}
 
83
 
 
84
 
 
85
Unity.init({ name: "Proqpon",
 
86
                        domain: 'proqpon.com',
 
87
                        homepage: 'http://www.proqpon.com',
 
88
                        iconUrl: "http://ubuntuone.com/3pf86WH8B3Ot2kwn1SczQs",
 
89
                        onInit: wrapCallback(unityReady) });
 
90
 
 
91