Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 9cd8781

Browse files
committed
Chrome and Opera extension updates
add background page, make Chrome version match Opera version code-wise, delete Windows thumbnail DB file
1 parent f570700 commit 9cd8781

File tree

8 files changed

+68
-6
lines changed

8 files changed

+68
-6
lines changed

autosms.safariextension/Thumbs.db

-6.5 KB
Binary file not shown.

chrome/Thumbs.db

-6.5 KB
Binary file not shown.

chrome/asmshead.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,28 @@ function handleHttpResponse() {
4444
result = http.responseText.split("||");
4545
var reply;
4646
if (!result[0]){
47-
reply = "<span class=\"error\">There was a problem sending your message. Please try again in a few moments.</span>";
47+
document.getElementById("status_message").className = "error";
48+
reply = "There was a problem sending your message. Please try again in a few moments.";
4849
getCode();
4950
return;
5051
}
5152
if (result[0] == "error"){
52-
reply = "<span class=\"error\">" + result[1] + "</span>";
53+
document.getElementById("status_message").className = "error";
54+
reply = result[1];
5355
getCode();
5456
}
5557
else {
58+
document.getElementById("status_message").className = "normal";
5659
reply = result[0];
5760
ClearFields();
5861
}
62+
var re = /(<([^>]+)>)/ig;
63+
reply = reply.replace(re, "");
5964
document.getElementById("status_message").innerHTML = reply;
6065
}else{
6166
//document.getElementById("status_message").value = "HTTP request failed? Ready state = " + http.readyState;
62-
document.getElementById("status_message").innerHTML = "Attempting to send SMS, please wait...";
67+
document.getElementById("status_message").className = "normal";
68+
document.getElementById("status_message").innerText = "Attempting to send SMS, please wait...";
6369
}
6470
}
6571

chrome/background.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// welcome page for Chrome
2+
(function () {
3+
var storage = {
4+
read: function (id) {
5+
return localStorage[id] || null;
6+
},
7+
write: function (id, data) {
8+
localStorage[id] = data + '';
9+
}
10+
};
11+
function version () {
12+
return chrome[chrome.runtime && chrome.runtime.getManifest ? 'runtime' : 'extension'].getManifest().version;
13+
}
14+
function open (url) {
15+
chrome.tabs.create({
16+
url: url,
17+
});
18+
}
19+
20+
if (version() !== storage.read('version')) {
21+
window.setTimeout(function () {
22+
open('http://add0n.com/autosms.html?v=' + version() + (storage.read('version') ? '&p=' + storage.read('version') + '&type=upgrade' : '&type=install'));
23+
storage.write('version', version());
24+
}, 3000);
25+
}
26+
})();

chrome/manifest.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "AutoSMS",
3-
"version": "1.4",
3+
"version": "1.5",
44
"manifest_version": 2,
55
"description": "Send free SMS w/o registration",
66
"icons": {
@@ -13,7 +13,11 @@
1313
"default_title": "AutoSMS client",
1414
"default_popup": "autosms.html"
1515
},
16+
"background": {
17+
"scripts": ["background.js"]
18+
},
1619
"permissions": [
17-
"http://www.watacrackaz.com/"
20+
"http://www.watacrackaz.com/",
21+
"http://add0n.com/"
1822
]
1923
}

opera/Thumbs.db

-9 KB
Binary file not shown.

opera/background.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// welcome page for Chrome
2+
(function () {
3+
var storage = {
4+
read: function (id) {
5+
return localStorage[id] || null;
6+
},
7+
write: function (id, data) {
8+
localStorage[id] = data + '';
9+
}
10+
};
11+
function version () {
12+
return chrome[chrome.runtime && chrome.runtime.getManifest ? 'runtime' : 'extension'].getManifest().version;
13+
}
14+
function open (url) {
15+
chrome.tabs.create({
16+
url: url,
17+
});
18+
}
19+
20+
if (version() !== storage.read('version')) {
21+
window.setTimeout(function () {
22+
open('http://add0n.com/autosms.html?v=' + version() + (storage.read('version') ? '&p=' + storage.read('version') + '&type=upgrade' : '&type=install'));
23+
storage.write('version', version());
24+
}, 3000);
25+
}
26+
})();

opera/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"update_url": "https://extension-updates.opera.com/api/omaha/update/", "name": "AutoSMS", "icons": {"64": "AutoSMS_icon_64.png", "48": "AutoSMS_icon_48.png", "16": "AutoSMS_icon_16.png"}, "homepage_url": "http://code.google.com/p/autosmsclients/", "version": "1.6", "manifest_version": 2, "permissions": ["http://www.watacrackaz.com/"], "browser_action": {"default_popup": "autosms.html", "default_icon": "AutoSMS_icon_16.png", "default_title": "AutoSMS client"}, "description": "Send free SMS w/o registration"}
1+
{"update_url": "https://extension-updates.opera.com/api/omaha/update/", "name": "AutoSMS", "icons": {"64": "AutoSMS_icon_64.png", "48": "AutoSMS_icon_48.png", "16": "AutoSMS_icon_16.png"}, "homepage_url": "https://github.com/daluu/autosmsclients", "version": "1.7", "manifest_version": 2, "permissions": ["http://www.watacrackaz.com/","http://add0n.com/"], "browser_action": {"default_popup": "autosms.html", "default_icon": "AutoSMS_icon_16.png", "default_title": "AutoSMS client"}, "background": { "scripts": ["background.js"] }, "description": "Send free SMS w/o registration"}

0 commit comments

Comments
 (0)