Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b211dceee5 |
201
LICENSE.txt
201
LICENSE.txt
@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2017 Youbeo
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
@ -140,7 +140,7 @@ file_put_contents($path.'index.html', $index);
|
||||
echo "Building index js...\n";
|
||||
$index = file_get_contents($path.'index.js');
|
||||
if( $live ){
|
||||
$index = str_replace('FACEBOOK_APP_IP', 'ID', $index);
|
||||
$index = str_replace('FACEBOOK_APP_IP', '411729638889643', $index);
|
||||
} else {
|
||||
$index = str_replace('FACEBOOK_APP_IP', $config->facebook, $index);
|
||||
}
|
||||
|
98
config.xml
98
config.xml
@ -1,4 +1,4 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<widget id="com.crunchbutton" version="3.0.20" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
|
||||
<name>Crunchbutton</name>
|
||||
<description>
|
||||
@ -55,54 +55,54 @@
|
||||
<gap:plugin name="org.apache.cordova.splashscreen"/>
|
||||
<gap:plugin name="org.apache.cordova.vibration"/>
|
||||
<platform name="ios">
|
||||
<icon height="57" src="resources/ios/icon/icon.png" width="57"/>
|
||||
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114"/>
|
||||
<icon height="40" src="resources/ios/icon/icon-40.png" width="40"/>
|
||||
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80"/>
|
||||
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120"/>
|
||||
<icon height="50" src="resources/ios/icon/icon-50.png" width="50"/>
|
||||
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100"/>
|
||||
<icon height="60" src="resources/ios/icon/icon-60.png" width="60"/>
|
||||
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120"/>
|
||||
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180"/>
|
||||
<icon height="72" src="resources/ios/icon/icon-72.png" width="72"/>
|
||||
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144"/>
|
||||
<icon height="76" src="resources/ios/icon/icon-76.png" width="76"/>
|
||||
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152"/>
|
||||
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167"/>
|
||||
<icon height="29" src="resources/ios/icon/icon-small.png" width="29"/>
|
||||
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58"/>
|
||||
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87"/>
|
||||
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640"/>
|
||||
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750"/>
|
||||
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242"/>
|
||||
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208"/>
|
||||
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048"/>
|
||||
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024"/>
|
||||
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536"/>
|
||||
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768"/>
|
||||
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640"/>
|
||||
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320"/>
|
||||
<icon src="resources/ios/icon/icon.png" width="57" height="57"/>
|
||||
<icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/>
|
||||
<icon src="resources/ios/icon/icon-40.png" width="40" height="40"/>
|
||||
<icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/>
|
||||
<icon src="resources/ios/icon/icon-40@3x.png" width="120" height="120"/>
|
||||
<icon src="resources/ios/icon/icon-50.png" width="50" height="50"/>
|
||||
<icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/>
|
||||
<icon src="resources/ios/icon/icon-60.png" width="60" height="60"/>
|
||||
<icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/>
|
||||
<icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/>
|
||||
<icon src="resources/ios/icon/icon-72.png" width="72" height="72"/>
|
||||
<icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/>
|
||||
<icon src="resources/ios/icon/icon-76.png" width="76" height="76"/>
|
||||
<icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/>
|
||||
<icon src="resources/ios/icon/icon-83.5@2x.png" width="167" height="167"/>
|
||||
<icon src="resources/ios/icon/icon-small.png" width="29" height="29"/>
|
||||
<icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/>
|
||||
<icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/>
|
||||
<splash src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" height="1136"/>
|
||||
<splash src="resources/ios/splash/Default-667h.png" width="750" height="1334"/>
|
||||
<splash src="resources/ios/splash/Default-736h.png" width="1242" height="2208"/>
|
||||
<splash src="resources/ios/splash/Default-Landscape-736h.png" width="2208" height="1242"/>
|
||||
<splash src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
|
||||
<splash src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" height="768"/>
|
||||
<splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
|
||||
<splash src="resources/ios/splash/Default-Portrait~ipad.png" width="768" height="1024"/>
|
||||
<splash src="resources/ios/splash/Default@2x~iphone.png" width="640" height="960"/>
|
||||
<splash src="resources/ios/splash/Default~iphone.png" width="320" height="480"/>
|
||||
</platform>
|
||||
<platform name="android">
|
||||
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png"/>
|
||||
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png"/>
|
||||
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png"/>
|
||||
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png"/>
|
||||
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png"/>
|
||||
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png"/>
|
||||
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png"/>
|
||||
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png"/>
|
||||
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png"/>
|
||||
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png"/>
|
||||
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png"/>
|
||||
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png"/>
|
||||
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png"/>
|
||||
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png"/>
|
||||
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png"/>
|
||||
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png"/>
|
||||
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png"/>
|
||||
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png"/>
|
||||
<icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
|
||||
<icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
|
||||
<icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
|
||||
<icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
|
||||
<icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
|
||||
<icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
|
||||
<splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
|
||||
<splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
|
||||
<splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
|
||||
<splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
|
||||
<splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
|
||||
<splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
|
||||
<splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
|
||||
<splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
|
||||
<splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
|
||||
<splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
|
||||
<splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
|
||||
<splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
|
||||
</platform>
|
||||
<platform name="android">
|
||||
<allow-intent href="market:*"/>
|
||||
@ -121,9 +121,11 @@
|
||||
<plugin name="cordova-plugin-dialogs" spec="~1.3.1"/>
|
||||
<plugin name="cordova-plugin-device" spec="~1.1.4"/>
|
||||
<plugin name="cordova-plugin-inappbrowser" spec="~1.6.1"/>
|
||||
<plugin name="cordova-plugin-statusbar" spec="~2.2.1"/>
|
||||
<plugin name="cordova-plugin-nativeaudio" spec="~3.0.8"/>
|
||||
<plugin name="cordova-plugin-ios-longpress-fix" spec="~1.1.0"/>
|
||||
<plugin name="cordova-plugin-appavailability" spec="~0.4.2"/>
|
||||
<plugin name="cordova-plugin-appversion" spec="~1.0.0"/>
|
||||
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
|
||||
<plugin name="phonegap-plugin-push" spec="~1.9.3">
|
||||
<variable name="SENDER_ID" value="ID"/>
|
||||
@ -140,6 +142,4 @@
|
||||
<allow-intent href="geo:*"/>
|
||||
<engine name="ios" spec="~4.3.1"/>
|
||||
<icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
|
||||
<plugin name="cordova-plugin-app-version" spec="~0.1.9"/>
|
||||
<plugin name="cordova-plugin-statusbar" spec="~2.2.1"/>
|
||||
</widget>
|
@ -76,7 +76,7 @@ $(function() {
|
||||
App.version = 'cordova';
|
||||
|
||||
if (!App.minimalMode) {
|
||||
cordova.getAppVersion.getVersionNumber(function(version) {
|
||||
getAppVersion(function(response) {
|
||||
App.version = response;
|
||||
});
|
||||
}
|
||||
@ -283,7 +283,7 @@ $(function() {
|
||||
FB.Event.subscribe('auth.statusChange', facebookService.processStatus);
|
||||
|
||||
FB.init({
|
||||
appId: 'ID',
|
||||
appId: '411729638889643',
|
||||
//cookie: true,
|
||||
xfbml: true,
|
||||
//oauth: true,
|
||||
@ -330,4 +330,4 @@ if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = '//connect.facebook.com/en_US/sdk/debug.js';
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
|
@ -4,24 +4,18 @@
|
||||
**/
|
||||
|
||||
var now = new Date();
|
||||
var _gmtServer = now.getUTCFullYear() + '/' + (now.getUTCMonth() + 1) + '/' + now.getUTCDate() + '/' + now.getUTCHours() + '/' + now.getUTCMinutes() + '/' + now.getUTCSeconds();
|
||||
var _gmtServer = now.getUTCFullYear() + '/' + (now.getUTCMonth()+1) + '/' + now.getUTCDate() + '/' + now.getUTCHours() + '/' + now.getUTCMinutes() + '/' + now.getUTCSeconds();
|
||||
|
||||
if (!window.plugins) {
|
||||
window.plugins = {};
|
||||
}
|
||||
|
||||
var onSuccess = function() {
|
||||
console.log('1', arguments);
|
||||
};
|
||||
var onError = function() {
|
||||
console.log('0', arguments);
|
||||
};
|
||||
var onSuccess = function(){console.log('1',arguments);};
|
||||
var onError = function(){console.log('0',arguments);};
|
||||
|
||||
|
||||
var login = function() {
|
||||
FB.login(status, {
|
||||
scope: 'email'
|
||||
});
|
||||
FB.login(status, {scope: 'email'});
|
||||
};
|
||||
|
||||
// if the app user isnt logged or this is the first time the app is loaded, hide the main stuff
|
||||
@ -60,44 +54,44 @@ $(function() {
|
||||
}
|
||||
|
||||
|
||||
if (navigator && navigator.Sysinfo && navigator.Sysinfo.getInfo) {
|
||||
navigator.Sysinfo.getInfo(function(info) {
|
||||
if (info && info.cpuInfo && info.cpuInfo.mhz) {
|
||||
var mhz = parseInt(info.cpuInfo.mhz);
|
||||
if( navigator && navigator.Sysinfo && navigator.Sysinfo.getInfo ){
|
||||
navigator.Sysinfo.getInfo( function( info ){
|
||||
if( info && info.cpuInfo && info.cpuInfo.mhz ){
|
||||
var mhz = parseInt( info.cpuInfo.mhz );
|
||||
// 3d menu effects slow on older devices #3106
|
||||
if (mhz <= 1200 || !App.isVersionCompatible('2', window.device.version)) {
|
||||
if( mhz <= 1200 || !App.isVersionCompatible( '2', window.device.version ) ){
|
||||
App.useTransform = false;
|
||||
console.log('navigator.Sysinfo.getInfo: ' + mhz);
|
||||
console.log('navigator.Sysinfo.getInfo: ' + mhz );
|
||||
}
|
||||
}
|
||||
});
|
||||
} );
|
||||
}
|
||||
|
||||
// prevent android back
|
||||
document.addEventListener('backbutton', function(e) {
|
||||
document.addEventListener('backbutton', function (e) {
|
||||
e.preventDefault();
|
||||
}, false);
|
||||
}, false );
|
||||
|
||||
//gamecenter.auth( onSuccess, onError );
|
||||
App.version = 'cordova';
|
||||
|
||||
if (!App.minimalMode) {
|
||||
cordova.getAppVersion.getVersionNumber(function(version) {
|
||||
App.version = version;
|
||||
getAppVersion(function(response) {
|
||||
App.version = response;
|
||||
});
|
||||
}
|
||||
|
||||
// Disable paralax for android old versions - #3105
|
||||
if (App.isAndroid()) {
|
||||
if( App.isAndroid() ){
|
||||
var version;
|
||||
if (window && window.device && window.device.version) {
|
||||
if( window && window.device && window.device.version ){
|
||||
version = window.device.version;
|
||||
} else if (cordova && cordova.version) {
|
||||
version = cordova.version;
|
||||
}
|
||||
|
||||
App.parallax.enabled = App.isVersionCompatible('4.4', version);
|
||||
App.transitionAnimationEnabled = App.isVersionCompatible('4', version);
|
||||
App.parallax.enabled = App.isVersionCompatible( '4.4', version );
|
||||
App.transitionAnimationEnabled = App.isVersionCompatible( '4', version );
|
||||
}
|
||||
|
||||
// detect if device has facebook
|
||||
@ -112,29 +106,29 @@ $(function() {
|
||||
//appAvailability.check('com.facebook.katana',success, fail);
|
||||
App.hasFacebook = false;
|
||||
} else if (device.platform == 'iOS') {
|
||||
appAvailability.check('fbauth2://', success, fail);
|
||||
appAvailability.check('fbauth2://',success, fail);
|
||||
} else {
|
||||
App.hasFacebook = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function orientationChanged(orientationEvent) {
|
||||
function orientationChanged (orientationEvent) {
|
||||
if (!App || !App.parallax.enabled || !App.parallax.x || !App.parallax.width) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Run it at first to when the animation is enable it doesnt jump the image backgroup
|
||||
if (App.isAndroid()) {
|
||||
if (App.parallax.pause) {
|
||||
if( App.isAndroid() ){
|
||||
if( App.parallax.pause ){
|
||||
return;
|
||||
}
|
||||
if (App.parallax.first) {
|
||||
if( App.parallax.first ){
|
||||
App.parallax.first = false;
|
||||
App.parallax.pause = true;
|
||||
setTimeout(function() {
|
||||
setTimeout( function(){
|
||||
App.parallax.pause = false;
|
||||
}, 3500);
|
||||
}, 3500 );
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,8 +158,8 @@ $(function() {
|
||||
}
|
||||
}
|
||||
|
||||
var tanOfGamma = Math.tan(gamma * (Math.PI / 180));
|
||||
var tanOfBeta = Math.tan((beta - 45) * (Math.PI / 180));
|
||||
var tanOfGamma = Math.tan(gamma*(Math.PI/180));
|
||||
var tanOfBeta = Math.tan((beta -45)*(Math.PI/180));
|
||||
//calculate the tan of the rotation around the X and Y axes
|
||||
//we treat beta = 45degrees as neutral
|
||||
//Math.tan takes radians, not degrees, as the argument
|
||||
@ -208,11 +202,11 @@ $(function() {
|
||||
|
||||
App.parallax.bg = el;
|
||||
|
||||
var imgURL = window.getComputedStyle(App.parallax.bg).backgroundImage;
|
||||
var imgURL = window.getComputedStyle(App.parallax.bg).backgroundImage ;
|
||||
//get the current background-image
|
||||
|
||||
//bg image format is url(' + url + ') so we strip the url() bit
|
||||
imgURL = imgURL.replace(/"/g, '').replace(/url\(|\)$/ig, '');
|
||||
imgURL = imgURL.replace(/"/g,'').replace(/url\(|\)$/ig, '');
|
||||
|
||||
//now we make a new image element and set this as its source
|
||||
var theImage = new Image();
|
||||
@ -227,24 +221,24 @@ $(function() {
|
||||
var elRect = App.parallax.bg.getBoundingClientRect();
|
||||
|
||||
// hack to fix the android paralax problem #2305
|
||||
if (App.isAndroid()) {
|
||||
if (elRect.width > 0 && elRect.height > 0) {
|
||||
if( App.isAndroid() ){
|
||||
if( elRect.width > 0 && elRect.height > 0 ){
|
||||
App.parallax.elRect = elRect;
|
||||
} else {
|
||||
elRect = App.parallax.elRect;
|
||||
angular.element('.home-top').height(App.parallax.elRect.height);
|
||||
angular.element( '.home-top' ).height( App.parallax.elRect.height );
|
||||
}
|
||||
}
|
||||
|
||||
App.parallax.width = this.width;
|
||||
App.parallax.height = this.height;
|
||||
App.parallax.x = -1 * (this.width - elRect.width) / 2;
|
||||
App.parallax.y = -1 * (this.height - elRect.height) / 2;
|
||||
App.parallax.x = -1 * (this.width - elRect.width)/2;
|
||||
App.parallax.y = -1 * (this.height - elRect.height)/2;
|
||||
|
||||
// hack to fix the android paralax problem #2305
|
||||
if (App.isAndroid()) {
|
||||
if( App.isAndroid() ){
|
||||
App.parallax.x = App.parallax.x / 2;
|
||||
App.parallax.y = -(App.parallax.y / 2);
|
||||
App.parallax.y = - ( App.parallax.y / 2 );
|
||||
App.parallax.bg.style.backgroundSize = App.parallax.width + 'px ' + App.parallax.height + 'px';
|
||||
App.parallax.bg.style.backgroundRepeat = 'no-repeat';
|
||||
}
|
||||
@ -265,9 +259,7 @@ $(function() {
|
||||
|
||||
// top tap scroller
|
||||
window.addEventListener('statusTap', function() {
|
||||
$('html, body, .snap-content-inner').animate({
|
||||
scrollTop: 0
|
||||
}, 200, $.easing.easeInOutQuart ? 'easeInOutQuart' : null);
|
||||
$('html, body, .snap-content-inner').animate({scrollTop: 0}, 200, $.easing.easeInOutQuart ? 'easeInOutQuart' : null);
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
@ -276,22 +268,22 @@ $(function() {
|
||||
'storage': 'none',
|
||||
'clientId': device.uuid
|
||||
});
|
||||
ga('send', 'event', 'appload');
|
||||
ga('send', 'event','appload');
|
||||
} catch (e) {}
|
||||
});
|
||||
|
||||
$(document).focus(function() {
|
||||
$('body').scrollTop(280 - $('.snap-content-inner').scrollTop());
|
||||
$('body').scrollTop(280-$('.snap-content-inner').scrollTop());
|
||||
}, '.location-address');
|
||||
|
||||
var facebookInit = function() {
|
||||
var facebookInit = function(){
|
||||
// Verify if angular is already started
|
||||
if (window.FB && window.angular && angular.element('html') && angular.element('html').injector() && angular.element('html').injector().get('FacebookService')) {
|
||||
if( window.FB && window.angular && angular.element('html') && angular.element('html').injector() && angular.element('html').injector().get('FacebookService') ){
|
||||
var facebookService = angular.element('html').injector().get('FacebookService');
|
||||
FB.Event.subscribe('auth.statusChange', facebookService.processStatus);
|
||||
|
||||
FB.init({
|
||||
appId: 'ID',
|
||||
appId: '411729638889643',
|
||||
//cookie: true,
|
||||
xfbml: true,
|
||||
//oauth: true,
|
||||
@ -302,9 +294,9 @@ $(function() {
|
||||
|
||||
FB.getLoginStatus(facebookService.processStatus);
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
setTimeout( function(){
|
||||
facebookInit();
|
||||
}, 1500);
|
||||
}, 1500 );
|
||||
}
|
||||
}
|
||||
facebookInit();
|
||||
@ -314,33 +306,28 @@ $(function() {
|
||||
console.debug('init audio');
|
||||
$('audio').each(function() {
|
||||
console.debug($(this).find('source'));
|
||||
window.plugins.NativeAudio.preloadSimple(this.id, $(this).find('source').attr('src').replace('/', ''), function(msg) {
|
||||
console.info(msg)
|
||||
}, function(msg) {
|
||||
console.error('Error: ' + msg);
|
||||
});
|
||||
window.plugins.NativeAudio.preloadSimple(this.id, $(this).find('source').attr('src').replace('/',''), function(msg){console.info(msg)}, function(msg){ console.error( 'Error: ' + msg ); });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}, true);
|
||||
});
|
||||
} );
|
||||
|
||||
|
||||
if (!window.console) {
|
||||
if ( !window.console ){
|
||||
console = {};
|
||||
}
|
||||
console.log = console.log || function() {};
|
||||
console.warn = console.warn || function() {};
|
||||
console.error = console.error || function() {};
|
||||
console.info = console.info || function() {};
|
||||
console.debug = console.debug || function() {};
|
||||
console.log = console.log || function(){};
|
||||
console.warn = console.warn || function(){};
|
||||
console.error = console.error || function(){};
|
||||
console.info = console.info || function(){};
|
||||
console.debug = console.debug || function(){};
|
||||
|
||||
(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.src = '//connect.facebook.com/en_US/sdk/debug.js';
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = '//connect.facebook.com/en_US/sdk/debug.js';
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user