Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Commit

Permalink
auto change to new url
Browse files Browse the repository at this point in the history
  • Loading branch information
negue committed Aug 2, 2015
1 parent 79fa780 commit 98afe53
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.ocdevel.habitrpg" versionCode="56" version="0.0.56">
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.ocdevel.habitrpg" versionCode="59" version="0.0.59">
<name>HabitRPG</name>
<description>
Habit tracking which treats your goals like a Role Playing Game. Level up as you succeed, lose HP as you fail, earn money to buy weapons and armor.
Expand Down
2 changes: 1 addition & 1 deletion platforms/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="56" android:versionName="0.0.56" package="com.ocdevel.habitrpg" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:hardwareAccelerated="true" android:versionCode="59" android:versionName="0.0.59" package="com.ocdevel.habitrpg" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
Expand Down
8 changes: 7 additions & 1 deletion scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,15 @@ var habitrpg = angular.module('habitrpg', ['ionic', 'ngResource', 'ngCordova'])
},0);
}
});

var endpoint = localStorage.getItem('habitrpg-endpoint');

if(endpoint == 'https://habitrpg.com'){
localStorage.setItem('habitrpg-endpoint', 'https://habitica.com');
}
}])

.constant('API_URL', localStorage.getItem('habitrpg-endpoint') || 'https://habitrpg.com')
.constant('API_URL', localStorage.getItem('habitrpg-endpoint') || 'https://habitica.com')
//.constant('API_URL', 'http://localhost:3000')
.constant("STORAGE_USER_ID", 'habitrpg-user')
.constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings')
Expand Down
2 changes: 1 addition & 1 deletion scripts/controllers/purchaseCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ habitrpg.controller('PurchaseCtrl',
return;
}

if(ApiUrl.get() !== 'https://habitrpg.com'){
if(ApiUrl.get() !== 'https://habitica.com'){
alert("You are using a custom server, please contact your server administrator.");
return;
}
Expand Down

0 comments on commit 98afe53

Please sign in to comment.