mirror of
https://github.com/fergalmoran/chrometophone.git
synced 2025-12-26 19:52:49 +00:00
Context menu to send the page and selections in text inputs.
Added protocols translations Apk link adjusted to new wiki page
This commit is contained in:
@@ -57,8 +57,12 @@ sendtophone.installToolbarButton = function()
|
|||||||
sendtophone.showFirefoxContextMenu = function(event) {
|
sendtophone.showFirefoxContextMenu = function(event) {
|
||||||
// show or hide the menuitem based on what the context menu is on
|
// show or hide the menuitem based on what the context menu is on
|
||||||
// see http://kb.mozillazine.org/Adding_items_to_menus
|
// see http://kb.mozillazine.org/Adding_items_to_menus
|
||||||
document.getElementById("context-sendtophone-link").hidden = !gContextMenu.onLink;
|
gContextMenu.showItem("context-sendtophone-link", gContextMenu.onLink);
|
||||||
document.getElementById("context-sendtophone-image").hidden = !gContextMenu.onImage;
|
gContextMenu.showItem("context-sendtophone-image", gContextMenu.onImage);
|
||||||
document.getElementById("context-sendtophone-text").hidden = !gContextMenu.isTextSelected;
|
gContextMenu.showItem("context-sendtophone-text", gContextMenu.isTextSelected ||
|
||||||
|
(gContextMenu.onTextInput && gContextMenu.target.selectionEnd > gContextMenu.target.selectionStart) );
|
||||||
|
|
||||||
|
gContextMenu.showItem("context-sendtophone-page", !( gContextMenu.inDirList || gContextMenu.isContentSelected || gContextMenu.onTextInput || gContextMenu.onLink || gContextMenu.onImage ));
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,10 @@
|
|||||||
accesskey="&sendtophoneContextText.accesskey;"
|
accesskey="&sendtophoneContextText.accesskey;"
|
||||||
insertafter="context-searchselect"
|
insertafter="context-searchselect"
|
||||||
oncommand="sendtophone.onMenuItemCommand(event, 'text')"/>
|
oncommand="sendtophone.onMenuItemCommand(event, 'text')"/>
|
||||||
|
<menuitem id="context-sendtophone-page" label="&sendtophoneContextPage.label;"
|
||||||
|
accesskey="&sendtophoneContextPage.accesskey;"
|
||||||
|
insertafter="context-sendpage"
|
||||||
|
oncommand="sendtophone.onMenuItemCommand(event, 'page')"/>
|
||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
<toolbarpalette id="BrowserToolbarPalette">
|
<toolbarpalette id="BrowserToolbarPalette">
|
||||||
|
|||||||
@@ -58,7 +58,13 @@ var sendtophone = {
|
|||||||
case 'text':
|
case 'text':
|
||||||
title = "Selection";
|
title = "Selection";
|
||||||
url = 'http://www.google.com/';
|
url = 'http://www.google.com/';
|
||||||
selection = content.getSelection().toString();
|
if (gContextMenu.onTextInput)
|
||||||
|
{
|
||||||
|
var input = gContextMenu.target;
|
||||||
|
selection = input.value.substring(input.selectionStart, input.selectionEnd);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
selection = content.getSelection().toString();
|
||||||
break;
|
break;
|
||||||
case 'page':
|
case 'page':
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -6,5 +6,7 @@
|
|||||||
<!ENTITY sendtophoneContextImage.accesskey "A">
|
<!ENTITY sendtophoneContextImage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
||||||
<!ENTITY sendtophoneContextText.accesskey "A">
|
<!ENTITY sendtophoneContextText.accesskey "A">
|
||||||
|
<!ENTITY sendtophoneContextPage.label "Send this page to Android">
|
||||||
|
<!ENTITY sendtophoneContextPage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextLogout.label "Logout">
|
<!ENTITY sendtophoneContextLogout.label "Logout">
|
||||||
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
||||||
|
|||||||
@@ -7,3 +7,9 @@ LoginRequired=Login erforderlich, um den Link zu senden.
|
|||||||
LoginSuccessful=Sie sind eingeloggt
|
LoginSuccessful=Sie sind eingeloggt
|
||||||
DeviceNotRegistered=Du musst das chrometophone.apk auf Ihrem Handy installieren registriert sein, um diese GMail-Konto
|
DeviceNotRegistered=Du musst das chrometophone.apk auf Ihrem Handy installieren registriert sein, um diese GMail-Konto
|
||||||
Logoutsuccessful=Sie sind abgemeldet
|
Logoutsuccessful=Sie sind abgemeldet
|
||||||
|
marketLink=Market link
|
||||||
|
smsLink=SMS Number
|
||||||
|
smstoLink=SMS Number
|
||||||
|
mmsLink=MMS Number
|
||||||
|
mmstoLink=MMS Number
|
||||||
|
telLink=Telephone Number
|
||||||
@@ -6,5 +6,7 @@
|
|||||||
<!ENTITY sendtophoneContextImage.accesskey "A">
|
<!ENTITY sendtophoneContextImage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
||||||
<!ENTITY sendtophoneContextText.accesskey "A">
|
<!ENTITY sendtophoneContextText.accesskey "A">
|
||||||
|
<!ENTITY sendtophoneContextPage.label "Send this page to Android">
|
||||||
|
<!ENTITY sendtophoneContextPage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextLogout.label "Logout">
|
<!ENTITY sendtophoneContextLogout.label "Logout">
|
||||||
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
||||||
|
|||||||
@@ -7,3 +7,9 @@ LoginRequired=Login required to send the link.
|
|||||||
LoginSuccessful=You have logged in.
|
LoginSuccessful=You have logged in.
|
||||||
DeviceNotRegistered=You must install the chrometophone.apk on your phone registered to this GMail account
|
DeviceNotRegistered=You must install the chrometophone.apk on your phone registered to this GMail account
|
||||||
LogoutSuccessful=You are logged out
|
LogoutSuccessful=You are logged out
|
||||||
|
marketLink=Market link
|
||||||
|
smsLink=SMS Number
|
||||||
|
smstoLink=SMS Number
|
||||||
|
mmsLink=MMS Number
|
||||||
|
mmstoLink=MMS Number
|
||||||
|
telLink=Telephone Number
|
||||||
@@ -6,5 +6,7 @@
|
|||||||
<!ENTITY sendtophoneContextImage.accesskey "A">
|
<!ENTITY sendtophoneContextImage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextText.label "Enviar el texto a Android">
|
<!ENTITY sendtophoneContextText.label "Enviar el texto a Android">
|
||||||
<!ENTITY sendtophoneContextText.accesskey "A">
|
<!ENTITY sendtophoneContextText.accesskey "A">
|
||||||
|
<!ENTITY sendtophoneContextPage.label "Enviar página a Android">
|
||||||
|
<!ENTITY sendtophoneContextPage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextLogout.label "Salir">
|
<!ENTITY sendtophoneContextLogout.label "Salir">
|
||||||
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
||||||
|
|||||||
@@ -7,3 +7,9 @@ LoginRequired=Es necesario identificarse para enviar el enlace.
|
|||||||
LoginSuccessful=Se ha identificado correctamente.
|
LoginSuccessful=Se ha identificado correctamente.
|
||||||
DeviceNotRegistered=Debe instalar la aplicación en su teléfono y registrar la misma cuenta de correo
|
DeviceNotRegistered=Debe instalar la aplicación en su teléfono y registrar la misma cuenta de correo
|
||||||
LogoutSuccessful=Ha cerrado su sesión
|
LogoutSuccessful=Ha cerrado su sesión
|
||||||
|
marketLink=Market link
|
||||||
|
smsLink=Número SMS
|
||||||
|
smstoLink=Número SMS
|
||||||
|
mmsLink=Número MMS
|
||||||
|
mmstoLink=Número MMS
|
||||||
|
telLink=Número de teléfono
|
||||||
@@ -6,5 +6,7 @@
|
|||||||
<!ENTITY sendtophoneContextImage.accesskey "A">
|
<!ENTITY sendtophoneContextImage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
||||||
<!ENTITY sendtophoneContextText.accesskey "A">
|
<!ENTITY sendtophoneContextText.accesskey "A">
|
||||||
|
<!ENTITY sendtophoneContextPage.label "Send this page to Android">
|
||||||
|
<!ENTITY sendtophoneContextPage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextLogout.label "Logout">
|
<!ENTITY sendtophoneContextLogout.label "Logout">
|
||||||
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
||||||
|
|||||||
@@ -7,3 +7,9 @@ LoginRequired=Login requis pour envoyer ce lien.
|
|||||||
LoginSuccessful=Vous vous êtes connecté po
|
LoginSuccessful=Vous vous êtes connecté po
|
||||||
DeviceNotRegistered=Vous devez installer le chrometophone.apk sur votre téléphone inscrits à ce compte GMail
|
DeviceNotRegistered=Vous devez installer le chrometophone.apk sur votre téléphone inscrits à ce compte GMail
|
||||||
Logoutsuccessful=Vous n'êtes pas connecté
|
Logoutsuccessful=Vous n'êtes pas connecté
|
||||||
|
marketLink=Market link
|
||||||
|
smsLink=SMS Number
|
||||||
|
smstoLink=SMS Number
|
||||||
|
mmsLink=MMS Number
|
||||||
|
mmstoLink=MMS Number
|
||||||
|
telLink=Telephone Number
|
||||||
@@ -6,5 +6,7 @@
|
|||||||
<!ENTITY sendtophoneContextImage.accesskey "A">
|
<!ENTITY sendtophoneContextImage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
||||||
<!ENTITY sendtophoneContextText.accesskey "A">
|
<!ENTITY sendtophoneContextText.accesskey "A">
|
||||||
|
<!ENTITY sendtophoneContextPage.label "Send this page to Android">
|
||||||
|
<!ENTITY sendtophoneContextPage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextLogout.label "Logout">
|
<!ENTITY sendtophoneContextLogout.label "Logout">
|
||||||
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
||||||
|
|||||||
@@ -7,3 +7,9 @@ LoginRequired=Logáil isteach ag teastáil chun a sheoladh chuig an nasc.
|
|||||||
LoginSuccessful=Tá tú logáilte isteach
|
LoginSuccessful=Tá tú logáilte isteach
|
||||||
DeviceNotRegistered=Ní mór duit a shuiteáil ar do ghuthán chrometophone.apk cláraithe leis an gcuntas seo Gmail
|
DeviceNotRegistered=Ní mór duit a shuiteáil ar do ghuthán chrometophone.apk cláraithe leis an gcuntas seo Gmail
|
||||||
LogoutSuccessful=Tá tú logáilte amach
|
LogoutSuccessful=Tá tú logáilte amach
|
||||||
|
marketLink=Market link
|
||||||
|
smsLink=SMS Number
|
||||||
|
smstoLink=SMS Number
|
||||||
|
mmsLink=MMS Number
|
||||||
|
mmstoLink=MMS Number
|
||||||
|
telLink=Telephone Number
|
||||||
@@ -6,5 +6,7 @@
|
|||||||
<!ENTITY sendtophoneContextImage.accesskey "A">
|
<!ENTITY sendtophoneContextImage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
||||||
<!ENTITY sendtophoneContextText.accesskey "A">
|
<!ENTITY sendtophoneContextText.accesskey "A">
|
||||||
|
<!ENTITY sendtophoneContextPage.label "Send this page to Android">
|
||||||
|
<!ENTITY sendtophoneContextPage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextLogout.label "Logout">
|
<!ENTITY sendtophoneContextLogout.label "Logout">
|
||||||
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
||||||
|
|||||||
@@ -7,3 +7,9 @@ LoginRequired=लॉगइन करने के लिए लिंक भे
|
|||||||
LoginSuccessful=तुम अंदर लॉग इन किया है
|
LoginSuccessful=तुम अंदर लॉग इन किया है
|
||||||
DeviceNotRegistered=आप अपने फोन पर स्थापित chrometophone.apk इस जीमेल खाते में दर्ज करना होगा
|
DeviceNotRegistered=आप अपने फोन पर स्थापित chrometophone.apk इस जीमेल खाते में दर्ज करना होगा
|
||||||
LogoutSuccessful=तुम बाहर लॉग इन किया है
|
LogoutSuccessful=तुम बाहर लॉग इन किया है
|
||||||
|
marketLink=Market link
|
||||||
|
smsLink=SMS Number
|
||||||
|
smstoLink=SMS Number
|
||||||
|
mmsLink=MMS Number
|
||||||
|
mmstoLink=MMS Number
|
||||||
|
telLink=Telephone Number
|
||||||
@@ -6,5 +6,7 @@
|
|||||||
<!ENTITY sendtophoneContextImage.accesskey "A">
|
<!ENTITY sendtophoneContextImage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
||||||
<!ENTITY sendtophoneContextText.accesskey "A">
|
<!ENTITY sendtophoneContextText.accesskey "A">
|
||||||
|
<!ENTITY sendtophoneContextPage.label "Send this page to Android">
|
||||||
|
<!ENTITY sendtophoneContextPage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextLogout.label "Logout">
|
<!ENTITY sendtophoneContextLogout.label "Logout">
|
||||||
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
||||||
|
|||||||
@@ -7,3 +7,9 @@ LoginRequired=ログインリンクを送信するために必要です。
|
|||||||
LoginSuccessful=あなたはログインしている
|
LoginSuccessful=あなたはログインしている
|
||||||
DeviceNotRegistered=は あなたの携帯電話にこのGmailアカウントに登録chrometophone.apkをインストールする必要があります
|
DeviceNotRegistered=は あなたの携帯電話にこのGmailアカウントに登録chrometophone.apkをインストールする必要があります
|
||||||
LogoutSuccessful=あなたが記録されます。
|
LogoutSuccessful=あなたが記録されます。
|
||||||
|
marketLink=Market link
|
||||||
|
smsLink=SMS Number
|
||||||
|
smstoLink=SMS Number
|
||||||
|
mmsLink=MMS Number
|
||||||
|
mmstoLink=MMS Number
|
||||||
|
telLink=Telephone Number
|
||||||
@@ -6,5 +6,7 @@
|
|||||||
<!ENTITY sendtophoneContextImage.accesskey "A">
|
<!ENTITY sendtophoneContextImage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
<!ENTITY sendtophoneContextText.label "Send this text to Android">
|
||||||
<!ENTITY sendtophoneContextText.accesskey "A">
|
<!ENTITY sendtophoneContextText.accesskey "A">
|
||||||
|
<!ENTITY sendtophoneContextPage.label "Send this page to Android">
|
||||||
|
<!ENTITY sendtophoneContextPage.accesskey "A">
|
||||||
<!ENTITY sendtophoneContextLogout.label "Logout">
|
<!ENTITY sendtophoneContextLogout.label "Logout">
|
||||||
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
<!ENTITY sendtophoneContextLogout.accesskey "L">
|
||||||
|
|||||||
@@ -7,3 +7,9 @@ LoginRequired=登录后才可发送的链接。
|
|||||||
LoginSuccessful=你登录
|
LoginSuccessful=你登录
|
||||||
DeviceNotRegistered=您必须安装到手机上的chrometophone.apk注册此Gmail帐户
|
DeviceNotRegistered=您必须安装到手机上的chrometophone.apk注册此Gmail帐户
|
||||||
LogoutSuccessful=你是登出
|
LogoutSuccessful=你是登出
|
||||||
|
marketLink=Market link
|
||||||
|
smsLink=SMS Number
|
||||||
|
smstoLink=SMS Number
|
||||||
|
mmsLink=MMS Number
|
||||||
|
mmstoLink=MMS Number
|
||||||
|
telLink=Telephone Number
|
||||||
@@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
#context-sendtophone-link,
|
#context-sendtophone-link,
|
||||||
#context-sendtophone-image,
|
#context-sendtophone-image,
|
||||||
#context-sendtophone-text
|
#context-sendtophone-text,
|
||||||
|
#context-sendtophone-page
|
||||||
{
|
{
|
||||||
-moz-binding: url(chrome://global/content/bindings/menu.xml#menuitem-iconic) !important;
|
-moz-binding: url(chrome://global/content/bindings/menu.xml#menuitem-iconic) !important;
|
||||||
list-style-image: url("chrome://sendtophone/skin/toolbar-button.png") !important;
|
list-style-image: url("chrome://sendtophone/skin/toolbar-button.png") !important;
|
||||||
|
|||||||
@@ -1,14 +1,19 @@
|
|||||||
/* This js module doesn't export anything, it's meant to handle the protocol registration/unregistration*/
|
/* This js module doesn't export anything, it's meant to handle the protocol registration/unregistration */
|
||||||
var EXPORTED_SYMBOLS = [];
|
var EXPORTED_SYMBOLS = [];
|
||||||
|
|
||||||
const Cc = Components.classes;
|
const Cc = Components.classes;
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
|
|
||||||
|
var manager = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
||||||
|
var strings = Cc["@mozilla.org/intl/stringbundle;1"]
|
||||||
|
.getService(Ci.nsIStringBundleService)
|
||||||
|
.createBundle("chrome://sendtophone/locale/overlay.properties");
|
||||||
|
|
||||||
// Utility function to handle the preferences
|
// Utility function to handle the preferences
|
||||||
// https://developer.mozilla.org/en/Code_snippets/Preferences
|
// https://developer.mozilla.org/en/Code_snippets/Preferences
|
||||||
function PrefListener(branchName, func) {
|
function PrefListener(branchName, func) {
|
||||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
|
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
.getService(Components.interfaces.nsIPrefService);
|
.getService(Ci.nsIPrefService);
|
||||||
var branch = prefService.getBranch(branchName);
|
var branch = prefService.getBranch(branchName);
|
||||||
branch.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
branch.QueryInterface(Components.interfaces.nsIPrefBranch2);
|
||||||
|
|
||||||
@@ -67,7 +72,7 @@ function SendToPhone_ProtocolWrapper( properties )
|
|||||||
{
|
{
|
||||||
var myURI = decodeURI(aURI.spec);
|
var myURI = decodeURI(aURI.spec);
|
||||||
|
|
||||||
// Core functions
|
// Core functions loaded on demand
|
||||||
if (typeof sendtophoneCore == "undefined")
|
if (typeof sendtophoneCore == "undefined")
|
||||||
Components.utils.import("resource://sendtophone/sendtophone.js");
|
Components.utils.import("resource://sendtophone/sendtophone.js");
|
||||||
|
|
||||||
@@ -80,7 +85,7 @@ function SendToPhone_ProtocolWrapper( properties )
|
|||||||
classDescription : "SendToPhone handler for " + properties.scheme,
|
classDescription : "SendToPhone handler for " + properties.scheme,
|
||||||
classID : Components.ID( properties.ID ),
|
classID : Components.ID( properties.ID ),
|
||||||
contractID : "@mozilla.org/network/protocol;1?name=" + properties.scheme,
|
contractID : "@mozilla.org/network/protocol;1?name=" + properties.scheme,
|
||||||
linkTitle : properties.scheme + " link" // fixme, needs translations...
|
linkTitle : strings.GetStringFromName( properties.scheme + "Link" ) // Translations
|
||||||
}
|
}
|
||||||
|
|
||||||
return myHandler;
|
return myHandler;
|
||||||
@@ -88,34 +93,34 @@ function SendToPhone_ProtocolWrapper( properties )
|
|||||||
|
|
||||||
// This function takes care of register/unregister the protocol handlers as requested
|
// This function takes care of register/unregister the protocol handlers as requested
|
||||||
// It's called when the preferences change.
|
// It's called when the preferences change.
|
||||||
function toggleProtocolHandler(protocol, register)
|
function toggleProtocolHandler(branch, name)
|
||||||
{
|
{
|
||||||
|
// Get the value in preferences
|
||||||
|
var register = branch.getBoolPref(name);
|
||||||
// Retrieve the object for that protocol
|
// Retrieve the object for that protocol
|
||||||
var marketHandler = myProtocols[protocol];
|
var protocolHandler = sendToPhoneProtocols[ name ];
|
||||||
|
var proto = protocolHandler.prototype;
|
||||||
var manager = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
|
||||||
var proto = marketHandler.prototype;
|
|
||||||
|
|
||||||
if (register)
|
if (register)
|
||||||
{
|
{
|
||||||
if (!marketHandler.registered)
|
if (!protocolHandler.registered)
|
||||||
manager.registerFactory(proto.classID,
|
manager.registerFactory(proto.classID,
|
||||||
proto.classDescription,
|
proto.classDescription,
|
||||||
proto.contractID,
|
proto.contractID,
|
||||||
proto._xpcom_factory);
|
proto._xpcom_factory);
|
||||||
|
|
||||||
marketHandler.registered = true;
|
protocolHandler.registered = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (marketHandler.registered)
|
if (protocolHandler.registered)
|
||||||
manager.unregisterFactory(proto.classID, proto._xpcom_factory);
|
manager.unregisterFactory(proto.classID, proto._xpcom_factory);
|
||||||
marketHandler.registered = false;
|
protocolHandler.registered = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Each protocol handler
|
// Each protocol handler
|
||||||
var myProtocols = {
|
var sendToPhoneProtocols = {
|
||||||
market: SendToPhone_ProtocolWrapper( { scheme: "market", ID: "{751de080-95d1-11df-981c-0800200c9a66}" } ) ,
|
market: SendToPhone_ProtocolWrapper( { scheme: "market", ID: "{751de080-95d1-11df-981c-0800200c9a66}" } ) ,
|
||||||
sms: SendToPhone_ProtocolWrapper( { scheme: "sms", ID: "{345de080-95d1-11df-981c-0800200c9a66}" } ) ,
|
sms: SendToPhone_ProtocolWrapper( { scheme: "sms", ID: "{345de080-95d1-11df-981c-0800200c9a66}" } ) ,
|
||||||
smsto: SendToPhone_ProtocolWrapper( { scheme: "smsto", ID: "{854de080-95d1-11df-981c-0800200c9a66}" } ) ,
|
smsto: SendToPhone_ProtocolWrapper( { scheme: "smsto", ID: "{854de080-95d1-11df-981c-0800200c9a66}" } ) ,
|
||||||
@@ -125,8 +130,5 @@ var myProtocols = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Listen for changes in the preferences and register the protocols as needed.
|
// Listen for changes in the preferences and register the protocols as needed.
|
||||||
var preferencesListener = new PrefListener("extensions.sendtophone.protocols.",
|
var preferencesListener = new PrefListener("extensions.sendtophone.protocols.", toggleProtocolHandler);
|
||||||
function(branch, name) {
|
|
||||||
toggleProtocolHandler(name, branch.getBoolPref(name));
|
|
||||||
});
|
|
||||||
preferencesListener.register();
|
preferencesListener.register();
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ var sendtophoneCore = {
|
|||||||
apiVersion : 4,
|
apiVersion : 4,
|
||||||
loggedInUrl : "http://code.google.com/p/chrometophone/logo?login",
|
loggedInUrl : "http://code.google.com/p/chrometophone/logo?login",
|
||||||
loggedOutUrl : "http://code.google.com/p/chrometophone/logo?logout",
|
loggedOutUrl : "http://code.google.com/p/chrometophone/logo?logout",
|
||||||
apkUrl : "http://code.google.com/p/chrometophone/downloads/detail?name=chrometophone-android-v1.2.apk",
|
apkUrl : "http://code.google.com/p/chrometophone/wiki/AndroidApp",
|
||||||
|
|
||||||
init: function()
|
init: function()
|
||||||
{
|
{
|
||||||
@@ -196,7 +196,7 @@ var sendtophoneCore = {
|
|||||||
this.popupNotification(this.getString("DeviceNotRegistered"));
|
this.popupNotification(this.getString("DeviceNotRegistered"));
|
||||||
|
|
||||||
// Open tab with apk download
|
// Open tab with apk download
|
||||||
this.openTab(me.apkUrl);
|
this.openTab(this.apkUrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user