Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Use addEventListener and DOMContentLoaded."

This reverts commit ebd2e9b.
  • Loading branch information...
commit e76c702d5ba8422d1162efb1f733cdbcd88d16b1 1 parent ebd2e9b
@mudge authored
Showing with 15 additions and 17 deletions.
  1. +1 −1  spendthrift.manifest
  2. +14 −16 st.js
View
2  spendthrift.manifest
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# 2010-02-28-001
+# 2010-02-28
st.js
st.css
View
30 st.js
@@ -53,22 +53,20 @@ function addSpend() {
return false;
}
-document.addEventListener("DOMContentLoaded", function() {
- if (!window.openDatabase) {
- alert('Spendthrift is not supported by your current browser.');
- } else {
- try {
- var db = openDatabase('spendthrift', '1.0', 'Spendthrift Database', 65536);
- } catch(e) {
- alert("Error opening database " + e);
- }
+if (!window.openDatabase) {
+ alert('Spendthrift is not supported by your current browser.');
+} else {
+ try {
+ var db = openDatabase('spendthrift', '1.0', 'Spendthrift Database', 65536);
+ } catch(e) {
+ alert("Error opening database " + e);
}
+}
- db.transaction(function(t) {
- t.executeSql('CREATE TABLE IF NOT EXISTS spends (id INTEGER PRIMARY KEY, amount INTEGER NOT NULL, description NVARCHAR, spent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP);', [], nullDataHandler, errorHandler);
- });
+db.transaction(function(t) {
+ t.executeSql('CREATE TABLE IF NOT EXISTS spends (id INTEGER PRIMARY KEY, amount INTEGER NOT NULL, description NVARCHAR, spent_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP);', [], nullDataHandler, errorHandler);
+});
- db.transaction(function(t) {
- updatePage(t);
- });
-}, false);
+db.transaction(function(t) {
+ updatePage(t);
+});
Please sign in to comment.
Something went wrong with that request. Please try again.