summaryrefslogtreecommitdiff
path: root/threads.js
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2015-03-24 18:30:55 +0100
committerGubolin <gubolin@fantasymail.de>2015-03-24 18:30:55 +0100
commit3eb7ffb22905d2b516e98b9887831ebc526fb4c6 (patch)
tree5cea7ca54f227e270f1b3d3f6f934b63909376f8 /threads.js
parent315e01b93ae3f200cea44b086936e3d4d9ab7fc7 (diff)
parentfbb10834c62ca0712858ec4685b27f4ac1ef10ae (diff)
downloadsnap-3eb7ffb22905d2b516e98b9887831ebc526fb4c6.tar.gz
snap-3eb7ffb22905d2b516e98b9887831ebc526fb4c6.zip
Merge branch 'mobileapp' into development
Diffstat (limited to 'threads.js')
-rw-r--r--threads.js72
1 files changed, 0 insertions, 72 deletions
diff --git a/threads.js b/threads.js
index fab636e..f28704d 100644
--- a/threads.js
+++ b/threads.js
@@ -2780,78 +2780,6 @@ Process.prototype.reportTimer = function () {
return 0;
};
-Process.prototype.reportLanguage = function () {
- var ide = this.homeContext.receiver.parentThatIsA(IDE_Morph);
- if (ide) {
- var lang = ide.userLanguage;
- if (lang) {
- return lang;
- }
- }
- return 'en';
-};
-
-Process.prototype.reportLocation = function (name) {
- var myself = this;
-
- if (!myself.context.jsonpScript) {
- if (!navigator.geolocation) {
- myself.handleError({name: 'Location',
- message: 'navigator.geolocation is not supported'});
- }
- window.OSM_JSONP_Callback = function (data) {
- myself.context.json = data;
- window.OSM_JSONP_Callback = undefined;
- };
- myself.context.jsonpScript = document.createElement('script');
-
- navigator.geolocation.getCurrentPosition(
- function (pos) {
- var crd = pos.coords;
-
- myself.context.jsonpScript.src =
- 'https://nominatim.openstreetmap.org/reverse'
- + '?format=json&json_callback=OSM_JSONP_Callback'
- + '&zoom=18&addressdetails=1'
- + '&lat='
- + crd.latitude
- + '&lon='
- + crd.longitude;
- document.getElementsByTagName('HEAD')[0]
- .appendChild(myself.context.jsonpScript);
- },
- function (err) {
- console.log(err);
- myself.handleError({name: 'Location', message: err});
- },
- { enableHightAccuracy: true, timeout: 30000, maximumAge: 0}
- );
- } else {
- if (myself.context.json) {
- switch (myself.inputOption(name)) {
- case 'all':
- return myself.context.json.display_name;
- case 'state district':
- return myself.context.json.address.state_district;
- case 'house number':
- return myself.context.json.address.house_number;
- case 'licence':
- return myself.context.json.licence;
- case 'country':
- case 'state':
- case 'suburb':
- case 'city':
- case 'road':
- return myself.context.
- json.address[myself.inputOption(name)];
- }
- }
- }
-
- this.pushContext('doYield');
- this.pushContext();
-};
-
// Process Dates and times in Snap
// Map block options to built-in functions
var dateMap = {