Created
January 21, 2015 09:05
-
-
Save dkarzon/04c127e46458920f1fc6 to your computer and use it in GitHub Desktop.
NumberTap platform code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.NUMBERTAP_PLATFORM = 3; //Android | |
(function () { | |
// Append the bind() polyfill | |
var scriptElem = document.createElement('script'); | |
scriptElem.setAttribute('src', 'js/android2.3-jscompat.js'); | |
if (document.body) { | |
document.body.appendChild(scriptElem); | |
} else { | |
document.head.appendChild(scriptElem); | |
} | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.inAppBrowserWrap { | |
background-color: rgba(0,0,0,0.75); | |
color: rgba(235,235,235,1.0); | |
} | |
.inAppBrowserWrap menu { | |
overflow: auto; | |
list-style-type: none; | |
padding-left: 0; | |
} | |
.inAppBrowserWrap menu li { | |
font-size: 25px; | |
height: 25px; | |
float: left; | |
margin: 0 10px; | |
padding: 3px 10px; | |
text-decoration: none; | |
color: #ccc; | |
display: block; | |
background: rgba(30,30,30,0.50); | |
} | |
.inAppBrowserWrap menu li.disabled { | |
color: #777; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.NUMBERTAP_PLATFORM = 5; //FIREFOX OS | |
var request = window.navigator.mozApps.getSelf(); | |
request.onsuccess = function () { | |
if (request.result) { | |
// Pull the name of the app out of the App object | |
_app = request.result; | |
} | |
}; | |
window.plugins.version = { | |
getVersionName: function (callback) { | |
if (_app && _app.manifest) { | |
callback(_app.manifest.version); | |
} | |
else { | |
callback("1.0"); | |
} | |
} | |
}; | |
function setUuid(rawUuid) { | |
if (rawUuid) { | |
window.device.uuid = rawUuid; | |
return; | |
} | |
var uuid = guid(); | |
window.device.uuid = uuid; | |
localforage.setItem('uuid', uuid); | |
}; | |
if (!window.device.uuid) { | |
localforage.setDriver('localStorageWrapper', function () { | |
localforage.getItem('uuid', setUuid); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.NUMBERTAP_PLATFORM = 4; //IOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
-ms-content-zooming: none; | |
} | |
.settings .item-select select { | |
max-width: 100%; | |
width: 100%; | |
direction: ltr; | |
} | |
.tab-item { | |
flex: none; | |
-ms-flex: none; | |
min-width: 100px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.NUMBERTAP_PLATFORM = 2; //WINDOWS | |
(function () { | |
// Append the safeHTML polyfill | |
var scriptElem = document.createElement('script'); | |
scriptElem.setAttribute('src', 'js/winstore-jscompat.js'); | |
if (document.body) { | |
document.body.appendChild(scriptElem); | |
} else { | |
document.head.appendChild(scriptElem); | |
} | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
position: relative; | |
} | |
body { | |
-ms-touch-action:none; | |
-ms-content-zooming: none; | |
} | |
.backbutton { | |
display: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.NUMBERTAP_PLATFORM = 1; //WP8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment