From 0556962d07c4e36314ae674443e43ed2890a5c69 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 4 Dec 2013 14:38:28 -0500 Subject: [PATCH] Added add2home (Add To home Screen) for iPhone and iPad users. --- add2home/add2home-tests.ts | 5 +++++ add2home/add2home.d.ts | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 add2home/add2home-tests.ts create mode 100644 add2home/add2home.d.ts diff --git a/add2home/add2home-tests.ts b/add2home/add2home-tests.ts new file mode 100644 index 000000000..371a8f752 --- /dev/null +++ b/add2home/add2home-tests.ts @@ -0,0 +1,5 @@ +/// + +addToHome.show(false); +addToHome.close(); +addToHome.reset(); diff --git a/add2home/add2home.d.ts b/add2home/add2home.d.ts new file mode 100644 index 000000000..e1e9548f1 --- /dev/null +++ b/add2home/add2home.d.ts @@ -0,0 +1,15 @@ +// Type definitions for add2home v2.0.5 +// Project: http://cubiq.org/add-to-home-screen +// Definitions by: James Wilkins +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare var addToHome: { + /** Shows the popup. + * @param {boolean} overrideChecks Override all the compatibility checks and always show the popup. + */ + show: (overrideChecks: boolean) => void; + /** Closes the popup. */ + close: () => void; + /** Reset the local and session storages so the popup will show again (for automatic mode - has no affect if manually opening the popup). */ + reset: () => void; +}; \ No newline at end of file