├── wrapper.gradle ├── settings.gradle ├── gradle.properties ├── app └── src │ └── main │ ├── assets │ └── www │ │ ├── static │ │ ├── images │ │ │ ├── 1.png │ │ │ ├── 山林.png │ │ │ ├── 恐龙.png │ │ │ ├── 火锅.png │ │ │ ├── 鲸鱼.png │ │ │ ├── 404_1.png │ │ │ ├── 404_2.jpg │ │ │ ├── 404_2.png │ │ │ ├── hot.png │ │ │ ├── top_1.png │ │ │ ├── top_2.png │ │ │ ├── top_3.png │ │ │ ├── top_4.png │ │ │ ├── top_5.png │ │ │ ├── top_6.png │ │ │ ├── top_7.png │ │ │ ├── top_8.png │ │ │ ├── top_9.png │ │ │ ├── 头像1.jpg │ │ │ ├── 宇航员.png │ │ │ ├── 宇航员2.png │ │ │ ├── 宇航员3.png │ │ │ ├── 宇航员4.png │ │ │ ├── 封面 │ │ │ │ ├── 1.jpg │ │ │ │ └── 2.png │ │ │ ├── 火锅底料.png │ │ │ ├── 火锅底料2.png │ │ │ ├── 熊猫-气球.png │ │ │ ├── 熊猫先生.png │ │ │ ├── 社区公约.png │ │ │ ├── 纸飞机.png │ │ │ ├── 纸飞机2.png │ │ │ ├── 鲸鱼2.png │ │ │ ├── 鲸鱼3.png │ │ │ ├── top_10.png │ │ │ ├── loginIntro │ │ │ │ ├── 1.png │ │ │ │ ├── 2.png │ │ │ │ ├── 3.png │ │ │ │ ├── 4.png │ │ │ │ └── icon-1024.png │ │ │ └── default_avatar.png │ │ ├── font │ │ │ ├── FZSSJW.ttf │ │ │ ├── simfang.ttf │ │ │ ├── FZSSJW.css │ │ │ └── simfang.css │ │ ├── img │ │ │ ├── 1.2a4e590.png │ │ │ ├── 2.44fac64.png │ │ │ ├── 2.fc6016b.png │ │ │ ├── 3.2d04cb8.png │ │ │ ├── 4.5db301c.png │ │ │ ├── 山林.707a2bc.png │ │ │ ├── hot.5718464.png │ │ │ ├── top_1.bc61735.png │ │ │ ├── top_2.410ed52.png │ │ │ ├── top_3.16fbab7.png │ │ │ ├── top_4.961fe2d.png │ │ │ ├── top_5.6add3b3.png │ │ │ ├── top_6.7cc069c.png │ │ │ ├── top_7.5060218.png │ │ │ ├── top_8.b8ca45a.png │ │ │ ├── top_9.354a1df.png │ │ │ ├── 火锅底料2.aeccf58.png │ │ │ ├── top_10.5cf26e9.png │ │ │ └── icon-1024.4d628c3.png │ │ ├── fonts │ │ │ ├── materialdesignicons-webfont.147e337.woff │ │ │ ├── materialdesignicons-webfont.174c02f.ttf │ │ │ ├── materialdesignicons-webfont.64d4cf6.eot │ │ │ └── materialdesignicons-webfont.7a44ea1.woff2 │ │ ├── js │ │ │ ├── 11.35dbdaec4001225c4bb0.js │ │ │ ├── manifest.bf166f5fd02093e3e37e.js │ │ │ ├── 9.9f8e0c08bd9a414caf13.js │ │ │ ├── 10.1848fe390d228d243769.js │ │ │ ├── 12.0ac2a7d0a1d127eaee80.js │ │ │ └── 7.6064a107def14db70103.js │ │ └── css │ │ │ └── style.css │ │ ├── index.html │ │ ├── cordova-js-src │ │ └── android │ │ │ ├── nativeapiprovider.js │ │ │ └── promptbasednativeapi.js │ │ ├── plugins │ │ ├── ionic-plugin-keyboard │ │ │ └── www │ │ │ │ └── android │ │ │ │ └── keyboard.js │ │ ├── cordova-plugin-app-version │ │ │ └── www │ │ │ │ └── AppVersionPlugin.js │ │ ├── cordova-plugin-x-toast │ │ │ └── www │ │ │ │ └── Toast.js │ │ ├── cordova-plugin-device │ │ │ └── www │ │ │ │ └── device.js │ │ └── cordova-plugin-statusbar │ │ │ └── www │ │ │ └── statusbar.js │ │ └── cordova_plugins.js │ ├── res │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ ├── mipmap-ldpi │ │ └── ic_launcher.png │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ ├── drawable-land-hdpi │ │ └── screen.png │ ├── drawable-land-ldpi │ │ └── screen.png │ ├── drawable-land-mdpi │ │ └── screen.png │ ├── drawable-land-xhdpi │ │ └── screen.png │ ├── drawable-port-hdpi │ │ └── screen.png │ ├── drawable-port-ldpi │ │ └── screen.png │ ├── drawable-port-mdpi │ │ └── screen.png │ ├── drawable-port-xhdpi │ │ └── screen.png │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ ├── drawable-land-xxhdpi │ │ └── screen.png │ ├── drawable-land-xxxhdpi │ │ └── screen.png │ ├── drawable-port-xxhdpi │ │ └── screen.png │ ├── drawable-port-xxxhdpi │ │ └── screen.png │ ├── drawable-hdpi │ │ ├── ic_action_remove.png │ │ ├── ic_action_next_item.png │ │ └── ic_action_previous_item.png │ ├── drawable-mdpi │ │ ├── ic_action_remove.png │ │ ├── ic_action_next_item.png │ │ └── ic_action_previous_item.png │ ├── drawable-xhdpi │ │ ├── ic_action_remove.png │ │ ├── ic_action_next_item.png │ │ └── ic_action_previous_item.png │ ├── drawable-xxhdpi │ │ ├── ic_action_remove.png │ │ ├── ic_action_next_item.png │ │ └── ic_action_previous_item.png │ ├── values │ │ └── strings.xml │ └── xml │ │ └── config.xml │ ├── AndroidManifest.xml │ └── java │ ├── com │ └── app │ │ └── hgdl │ │ └── MainActivity.java │ ├── uk │ └── co │ │ └── whiteoctober │ │ └── cordova │ │ └── AppVersion.java │ └── org │ └── apache │ └── cordova │ └── inappbrowser │ └── InAppBrowserDialog.java ├── cordova ├── lib │ ├── getASPath.bat │ ├── PackageType.js │ ├── list-devices.bat │ ├── install-device.bat │ ├── start-emulator.bat │ ├── install-emulator.bat │ ├── list-emulator-images.bat │ ├── list-started-emulators.bat │ ├── list-devices │ ├── list-emulator-images │ ├── list-started-emulators │ ├── builders │ │ └── builders.js │ ├── start-emulator │ ├── install-emulator │ ├── install-device │ ├── log.js │ ├── plugin-build.gradle │ ├── retry.js │ ├── utils.js │ └── android_sdk.js ├── loggingHelper.js ├── version ├── log.bat ├── run.bat ├── build.bat ├── clean.bat ├── version.bat ├── check_reqs.bat ├── defaults.xml ├── android_sdk_version.bat ├── android_sdk_version ├── check_reqs ├── log ├── build ├── run └── clean ├── .gitignore ├── CordovaLib ├── project.properties ├── AndroidManifest.xml └── src │ └── org │ └── apache │ └── cordova │ ├── ICordovaCookieManager.java │ ├── ExposedJsApi.java │ ├── ICordovaHttpAuthHandler.java │ ├── CordovaHttpAuthHandler.java │ ├── AuthenticationToken.java │ ├── engine │ ├── SystemCookieManager.java │ ├── SystemExposedJsApi.java │ └── SystemWebView.java │ ├── ICordovaClientCertRequest.java │ ├── Config.java │ ├── PluginEntry.java │ ├── BuildHelper.java │ ├── CallbackMap.java │ ├── ResumeCallback.java │ ├── CordovaWebViewEngine.java │ ├── CordovaClientCertRequest.java │ ├── CordovaPreferences.java │ ├── CordovaInterface.java │ ├── CordovaArgs.java │ └── PermissionHelper.java ├── project.properties ├── README.md ├── LICENSE └── platform_www ├── cordova-js-src ├── android │ ├── nativeapiprovider.js │ └── promptbasednativeapi.js └── plugin │ └── android │ └── app.js ├── plugins ├── ionic-plugin-keyboard │ └── www │ │ └── android │ │ └── keyboard.js ├── cordova-plugin-app-version │ └── www │ │ └── AppVersionPlugin.js ├── cordova-plugin-x-toast │ └── www │ │ └── Toast.js ├── cordova-plugin-device │ └── www │ │ └── device.js └── cordova-plugin-statusbar │ └── www │ └── statusbar.js └── cordova_plugins.js /wrapper.gradle: -------------------------------------------------------------------------------- 1 | //This file is intentionally just a comment 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | // GENERATED FILE - DO NOT EDIT 2 | include ":" 3 | include ":CordovaLib" 4 | include ":app" 5 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.daemon=true 2 | org.gradle.jvmargs=-Xmx2048m 3 | android.useAndroidX=false 4 | android.enableJetifier=false -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/1.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/山林.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/山林.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/恐龙.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/恐龙.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/火锅.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/火锅.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/鲸鱼.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/鲸鱼.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/font/FZSSJW.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/font/FZSSJW.ttf -------------------------------------------------------------------------------- /app/src/main/assets/www/static/font/simfang.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/font/simfang.ttf -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/404_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/404_1.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/404_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/404_2.jpg -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/404_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/404_2.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/hot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/hot.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_1.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_2.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_3.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_4.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_5.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_6.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_7.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_8.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_9.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/头像1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/头像1.jpg -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/宇航员.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/宇航员.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/宇航员2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/宇航员2.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/宇航员3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/宇航员3.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/宇航员4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/宇航员4.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/封面/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/封面/1.jpg -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/封面/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/封面/2.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/火锅底料.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/火锅底料.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/火锅底料2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/火锅底料2.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/熊猫-气球.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/熊猫-气球.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/熊猫先生.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/熊猫先生.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/社区公约.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/社区公约.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/纸飞机.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/纸飞机.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/纸飞机2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/纸飞机2.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/鲸鱼2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/鲸鱼2.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/鲸鱼3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/鲸鱼3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-land-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-land-hdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-land-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-land-ldpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-land-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-land-mdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-land-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-land-xhdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-port-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-port-hdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-port-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-port-ldpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-port-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-port-mdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-port-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-port-xhdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/top_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/top_10.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/1.2a4e590.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/1.2a4e590.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/2.44fac64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/2.44fac64.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/2.fc6016b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/2.fc6016b.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/3.2d04cb8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/3.2d04cb8.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/4.5db301c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/4.5db301c.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/山林.707a2bc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/山林.707a2bc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-land-xxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-land-xxhdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-land-xxxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-land-xxxhdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-port-xxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-port-xxhdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-port-xxxhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-port-xxxhdpi/screen.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/hot.5718464.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/hot.5718464.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_1.bc61735.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_1.bc61735.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_2.410ed52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_2.410ed52.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_3.16fbab7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_3.16fbab7.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_4.961fe2d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_4.961fe2d.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_5.6add3b3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_5.6add3b3.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_6.7cc069c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_6.7cc069c.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_7.5060218.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_7.5060218.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_8.b8ca45a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_8.b8ca45a.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_9.354a1df.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_9.354a1df.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/火锅底料2.aeccf58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/火锅底料2.aeccf58.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-hdpi/ic_action_remove.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-mdpi/ic_action_remove.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-xhdpi/ic_action_remove.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/loginIntro/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/loginIntro/1.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/loginIntro/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/loginIntro/2.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/loginIntro/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/loginIntro/3.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/loginIntro/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/loginIntro/4.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/top_10.5cf26e9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/top_10.5cf26e9.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_next_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-hdpi/ic_action_next_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_next_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-mdpi/ic_action_next_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_remove.png -------------------------------------------------------------------------------- /cordova/lib/getASPath.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | for /f "tokens=2*" %%a in ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Android Studio" /v Path') do set "ASPath=%%~b" 3 | ECHO %ASPath% -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/default_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/default_avatar.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/img/icon-1024.4d628c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/img/icon-1024.4d628c3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_next_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-xhdpi/ic_action_next_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_next_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_next_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_previous_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-hdpi/ic_action_previous_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_previous_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-mdpi/ic_action_previous_item.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_previous_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-xhdpi/ic_action_previous_item.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/images/loginIntro/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/images/loginIntro/icon-1024.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_previous_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_previous_item.png -------------------------------------------------------------------------------- /app/src/main/assets/www/static/fonts/materialdesignicons-webfont.147e337.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/fonts/materialdesignicons-webfont.147e337.woff -------------------------------------------------------------------------------- /app/src/main/assets/www/static/fonts/materialdesignicons-webfont.174c02f.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/fonts/materialdesignicons-webfont.174c02f.ttf -------------------------------------------------------------------------------- /app/src/main/assets/www/static/fonts/materialdesignicons-webfont.64d4cf6.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/fonts/materialdesignicons-webfont.64d4cf6.eot -------------------------------------------------------------------------------- /app/src/main/assets/www/static/fonts/materialdesignicons-webfont.7a44ea1.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HypenZou/SCU-Anonymous-Forum/HEAD/app/src/main/assets/www/static/fonts/materialdesignicons-webfont.7a44ea1.woff2 -------------------------------------------------------------------------------- /app/src/main/assets/www/static/font/FZSSJW.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @font-face { 4 | font-family: "FZSSJW"; 5 | src: 6 | url("FZSSJW.ttf") format("truetype"); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/assets/www/static/font/simfang.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @font-face { 4 | font-family: "simfang"; 5 | src: 6 | url("simfang.ttf") format("truetype"); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 火锅底料 4 | @string/app_name 5 | @string/launcher_name 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Non-project-specific build files: 2 | build.xml 3 | local.properties 4 | /gradlew 5 | /gradlew.bat 6 | /gradle 7 | # Ant builds 8 | ant-build 9 | ant-gen 10 | # Eclipse builds 11 | gen 12 | out 13 | # Gradle build artifacts 14 | .gradle 15 | .gradletasknamecache 16 | /build 17 | /CordovaLib/build 18 | /app/build 19 | gradle-app.setting 20 | # Android Studio 21 | .idea 22 | -------------------------------------------------------------------------------- /CordovaLib/project.properties: -------------------------------------------------------------------------------- 1 | # This file was originally created by the Android Tools, but is now 2 | # used by cordova-android to manage the project configuration. 3 | 4 | # Indicates whether an apk should be generated for each density. 5 | split.density=false 6 | 7 | # Project target. 8 | target=android-29 9 | apk-configurations= 10 | renderscript.opt.level=O0 11 | android.library=true 12 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file was originally created by the Android Tools, but is now 2 | # used by cordova-android to manage the state of the various third party 3 | # libraries used in your application 4 | 5 | # This is the Library Module that contains the Cordova Library, this is not 6 | # required when using an AAR 7 | 8 | # This is the application project. This is only required for Android Studio Gradle projects 9 | 10 | # Project target. 11 | target=android-29 12 | android.library.reference.1=CordovaLib 13 | android.library.reference.2=app 14 | -------------------------------------------------------------------------------- /cordova/loggingHelper.js: -------------------------------------------------------------------------------- 1 | var CordovaLogger = require('cordova-common').CordovaLogger; 2 | 3 | module.exports = { 4 | adjustLoggerLevel: function (opts) { 5 | if (opts instanceof Array) { 6 | opts.silent = opts.indexOf('--silent') !== -1; 7 | opts.verbose = opts.indexOf('--verbose') !== -1; 8 | } 9 | 10 | if (opts.silent) { 11 | CordovaLogger.get().setLevel('error'); 12 | } 13 | 14 | if (opts.verbose) { 15 | CordovaLogger.get().setLevel('verbose'); 16 | } 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SCU-Anonymous-Forum 2 | 3 | 4 | 5 | 6 | 7 | 8 | ![](https://img.shields.io/github/languages/top/wubbalubbaaa/SCU-Anonymous-Forum)![](https://img.shields.io/bitbucket/issues-raw/wubbalubbaaa/SCU-Anonymous-Forum)![](https://img.shields.io/apm/l/vim-mode) 9 | 10 | ------ 11 | 12 | 这里是四川大学匿名社区『火锅底料』Android前端代码 13 | 14 | 采用vue+cordova+Android原生混合开发 15 | 16 | 在开发和设计过程中,参考了[thuhole](https://github.com/thuhole "清华树洞")的匿名机制和标签机制、[无可奉告](https://github.com/TairanHe/SJTU-Anonymous_Forum "无可奉告")的设计规范 17 | 18 | 并对在这一过程中,支持我们、为我们提出宝贵建议的朋友致以诚挚的谢意。 19 | 20 | 21 | 22 | 官网: [火锅底料官网](http://scuhuoguodiliao.com/"火锅底料官网") 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/assets/www/index.html: -------------------------------------------------------------------------------- 1 | huoguodiliao
-------------------------------------------------------------------------------- /app/src/main/assets/www/static/js/11.35dbdaec4001225c4bb0.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([11],{"7Sgi":function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-container",[e("v-app-bar",{staticClass:"top",attrs:{fixed:"",app:"",flat:"",color:"white"}},[e("v-btn",{staticClass:"mt-3",attrs:{fab:"",text:"",small:""},on:{click:function(a){return t.$router.back(-1)}}},[e("v-icon",{attrs:{large:""}},[t._v("mdi-arrow-left")])],1),t._v(" "),e("span",{staticClass:"text_middle mt-3"},[t._v("火锅底料社区公约")])],1),t._v(" "),e("div",[e("iframe",{staticClass:"main_container_topPost",attrs:{frameborder:"x",src:"http://localhost:8081/#/topPost"}})])],1)},staticRenderFns:[]};var s=e("C7Lr")({name:"topPost"},r,!1,function(t){e("XNQG")},null,null);a.default=s.exports},XNQG:function(t,a){}}); 2 | //# sourceMappingURL=11.35dbdaec4001225c4bb0.js.map -------------------------------------------------------------------------------- /cordova/lib/PackageType.js: -------------------------------------------------------------------------------- 1 | /** 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | const PackageType = { 21 | APK: 'apk', 22 | BUNDLE: 'bundle' 23 | }; 24 | 25 | module.exports = PackageType; 26 | -------------------------------------------------------------------------------- /cordova/version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | const Api = require('./Api'); 23 | 24 | console.log(Api.version()); 25 | -------------------------------------------------------------------------------- /cordova/log.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0log" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'log' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/run.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0run" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'run' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/build.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0build" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'build' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/clean.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0clean" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'clean' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/version.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0version" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'version' script in 'cordova' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /cordova/check_reqs.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0check_reqs" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'check_reqs' script in 'bin' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Dub Dub 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /cordova/lib/list-devices.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-devices" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-devices' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/lib/install-device.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0install-device" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'install-device' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/lib/start-emulator.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0start-emulator" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cordova/android_sdk_version.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0android_sdk_version" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'android_sdk_version' script in 'bin' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /cordova/lib/install-emulator.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0install-emulator" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'install-emulator' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/android_sdk_version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var android_sdk = require('./lib/android_sdk'); 23 | 24 | android_sdk.print_newest_available_sdk_target().catch(err => { 25 | console.error(err); 26 | process.exit(2); 27 | }); 28 | -------------------------------------------------------------------------------- /CordovaLib/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /cordova/lib/list-emulator-images.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-emulator-images" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-emulator-images' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) 27 | -------------------------------------------------------------------------------- /cordova/lib/list-started-emulators.bat: -------------------------------------------------------------------------------- 1 | :: Licensed to the Apache Software Foundation (ASF) under one 2 | :: or more contributor license agreements. See the NOTICE file 3 | :: distributed with this work for additional information 4 | :: regarding copyright ownership. The ASF licenses this file 5 | :: to you under the Apache License, Version 2.0 (the 6 | :: "License"); you may not use this file except in compliance 7 | :: with the License. You may obtain a copy of the License at 8 | :: 9 | :: http://www.apache.org/licenses/LICENSE-2.0 10 | :: 11 | :: Unless required by applicable law or agreed to in writing, 12 | :: software distributed under the License is distributed on an 13 | :: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | :: KIND, either express or implied. See the License for the 15 | :: specific language governing permissions and limitations 16 | :: under the License. 17 | 18 | @ECHO OFF 19 | SET script_path="%~dp0list-started-emulators" 20 | IF EXIST %script_path% ( 21 | node %script_path% %* 22 | ) ELSE ( 23 | ECHO. 24 | ECHO ERROR: Could not find 'list-started-emulators' script in 'cordova\lib' folder, aborting...>&2 25 | EXIT /B 1 26 | ) -------------------------------------------------------------------------------- /cordova/check_reqs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var check_reqs = require('./lib/check_reqs'); 23 | 24 | check_reqs.run().then( 25 | function success () { 26 | console.log('Looks like your environment fully supports cordova-android development!'); 27 | }, 28 | function fail (err) { 29 | console.log(err); 30 | process.exit(2); 31 | } 32 | ); 33 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/ICordovaCookieManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | public interface ICordovaCookieManager { 23 | 24 | public void setCookiesEnabled(boolean accept); 25 | 26 | public void setCookie(final String url, final String value); 27 | 28 | public String getCookie(final String url); 29 | 30 | public void clearCookies(); 31 | 32 | public void flush(); 33 | }; 34 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /cordova/log: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var log = require('./lib/log'); 23 | var reqs = require('./lib/check_reqs'); 24 | var args = process.argv; 25 | 26 | // Usage support for when args are given 27 | if (args.length > 2) { 28 | log.help(); 29 | } else { 30 | reqs.run().then(function () { 31 | return log.run(); 32 | }, function (err) { 33 | console.error('ERROR: ' + err); 34 | process.exit(2); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /cordova/lib/list-devices: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var devices = require('./device'); 23 | 24 | // Usage support for when args are given 25 | require('./check_reqs').check_android().then(function () { 26 | devices.list().then(function (device_list) { 27 | device_list && device_list.forEach(function (dev) { 28 | console.log(dev); 29 | }); 30 | }, function (err) { 31 | console.error('ERROR: ' + err); 32 | process.exit(2); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /cordova/lib/list-emulator-images: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulators = require('./emulator'); 23 | 24 | // Usage support for when args are given 25 | require('./check_reqs').check_android().then(function () { 26 | emulators.list_images().then(function (emulator_list) { 27 | emulator_list && emulator_list.forEach(function (emu) { 28 | console.log(emu.name); 29 | }); 30 | }, function (err) { 31 | console.error('ERROR: ' + err); 32 | process.exit(2); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /cordova/lib/list-started-emulators: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulators = require('./emulator'); 23 | 24 | // Usage support for when args are given 25 | require('./check_reqs').check_android().then(function () { 26 | emulators.list_started().then(function (emulator_list) { 27 | emulator_list && emulator_list.forEach(function (emu) { 28 | console.log(emu); 29 | }); 30 | }, function (err) { 31 | console.error('ERROR: ' + err); 32 | process.exit(2); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /cordova/lib/builders/builders.js: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | const CordovaError = require('cordova-common').CordovaError; 21 | 22 | /** 23 | * Helper method that instantiates and returns a builder for specified build type. 24 | * 25 | * @return {Builder} A builder instance for specified build type. 26 | */ 27 | module.exports.getBuilder = function (projectPath) { 28 | try { 29 | const Builder = require('./ProjectBuilder'); 30 | return new Builder(projectPath); 31 | } catch (err) { 32 | throw new CordovaError('Failed to instantiate ProjectBuilder builder: ' + err); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /cordova/lib/start-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulator = require('./emulator'); 23 | var args = process.argv; 24 | 25 | var install_target; 26 | if (args.length > 2) { 27 | if (args[2].substring(0, 9) === '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | } else { 30 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 31 | process.exit(2); 32 | } 33 | } 34 | 35 | emulator.start(install_target).catch(function (err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | -------------------------------------------------------------------------------- /platform_www/cordova-js-src/android/nativeapiprovider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Exports the ExposedJsApi.java object if available, otherwise exports the PromptBasedNativeApi. 22 | */ 23 | 24 | var nativeApi = this._cordovaNative || require('cordova/android/promptbasednativeapi'); 25 | var currentApi = nativeApi; 26 | 27 | module.exports = { 28 | get: function () { return currentApi; }, 29 | setPreferPrompt: function (value) { 30 | currentApi = value ? require('cordova/android/promptbasednativeapi') : nativeApi; 31 | }, 32 | // Used only by tests. 33 | set: function (value) { 34 | currentApi = value; 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /cordova/lib/install-emulator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var emulator = require('./emulator'); 23 | var args = process.argv; 24 | 25 | var install_target; 26 | if (args.length > 2) { 27 | if (args[2].substring(0, 9) === '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | } else { 30 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 31 | process.exit(2); 32 | } 33 | } 34 | 35 | emulator.install(install_target).catch(function (err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | -------------------------------------------------------------------------------- /app/src/main/assets/www/cordova-js-src/android/nativeapiprovider.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Exports the ExposedJsApi.java object if available, otherwise exports the PromptBasedNativeApi. 22 | */ 23 | 24 | var nativeApi = this._cordovaNative || require('cordova/android/promptbasednativeapi'); 25 | var currentApi = nativeApi; 26 | 27 | module.exports = { 28 | get: function () { return currentApi; }, 29 | setPreferPrompt: function (value) { 30 | currentApi = value ? require('cordova/android/promptbasednativeapi') : nativeApi; 31 | }, 32 | // Used only by tests. 33 | set: function (value) { 34 | currentApi = value; 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/ExposedJsApi.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | import org.json.JSONException; 23 | 24 | /* 25 | * Any exposed Javascript API MUST implement these three things! 26 | */ 27 | public interface ExposedJsApi { 28 | public String exec(int bridgeSecret, String service, String action, String callbackId, String arguments) throws JSONException, IllegalAccessException; 29 | public void setNativeToJsBridgeMode(int bridgeSecret, int value) throws IllegalAccessException; 30 | public String retrieveJsMessages(int bridgeSecret, boolean fromOnlineEvent) throws IllegalAccessException; 31 | } 32 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/ICordovaHttpAuthHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | /** 22 | * Specifies interface for HTTP auth handler object which is used to handle auth requests and 23 | * specifying user credentials. 24 | */ 25 | public interface ICordovaHttpAuthHandler { 26 | /** 27 | * Instructs the WebView to cancel the authentication request. 28 | */ 29 | public void cancel (); 30 | 31 | /** 32 | * Instructs the WebView to proceed with the authentication with the given credentials. 33 | * 34 | * @param username The user name 35 | * @param password The password 36 | */ 37 | public void proceed (String username, String password); 38 | } -------------------------------------------------------------------------------- /platform_www/cordova-js-src/android/promptbasednativeapi.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Implements the API of ExposedJsApi.java, but uses prompt() to communicate. 22 | * This is used pre-JellyBean, where addJavascriptInterface() is disabled. 23 | */ 24 | 25 | module.exports = { 26 | exec: function (bridgeSecret, service, action, callbackId, argsJson) { 27 | return prompt(argsJson, 'gap:' + JSON.stringify([bridgeSecret, service, action, callbackId])); 28 | }, 29 | setNativeToJsBridgeMode: function (bridgeSecret, value) { 30 | prompt(value, 'gap_bridge_mode:' + bridgeSecret); 31 | }, 32 | retrieveJsMessages: function (bridgeSecret, fromOnlineEvent) { 33 | return prompt(+fromOnlineEvent, 'gap_poll:' + bridgeSecret); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /app/src/main/assets/www/cordova-js-src/android/promptbasednativeapi.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /** 21 | * Implements the API of ExposedJsApi.java, but uses prompt() to communicate. 22 | * This is used pre-JellyBean, where addJavascriptInterface() is disabled. 23 | */ 24 | 25 | module.exports = { 26 | exec: function (bridgeSecret, service, action, callbackId, argsJson) { 27 | return prompt(argsJson, 'gap:' + JSON.stringify([bridgeSecret, service, action, callbackId])); 28 | }, 29 | setNativeToJsBridgeMode: function (bridgeSecret, value) { 30 | prompt(value, 'gap_bridge_mode:' + bridgeSecret); 31 | }, 32 | retrieveJsMessages: function (bridgeSecret, fromOnlineEvent) { 33 | return prompt(+fromOnlineEvent, 'gap_poll:' + bridgeSecret); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/app/hgdl/MainActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package com.app.hgdl; 21 | 22 | import android.os.Bundle; 23 | import org.apache.cordova.*; 24 | 25 | public class MainActivity extends CordovaActivity 26 | { 27 | @Override 28 | public void onCreate(Bundle savedInstanceState) 29 | { 30 | super.onCreate(savedInstanceState); 31 | 32 | // enable Cordova apps to be started in the background 33 | Bundle extras = getIntent().getExtras(); 34 | if (extras != null && extras.getBoolean("cdvStartInBackground", false)) { 35 | moveTaskToBack(true); 36 | } 37 | 38 | // Set by in config.xml 39 | loadUrl(launchUrl); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /cordova/lib/install-device: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var device = require('./device'); 23 | var args = process.argv; 24 | 25 | if (args.length > 2) { 26 | var install_target; 27 | if (args[2].substring(0, 9) === '--target=') { 28 | install_target = args[2].substring(9, args[2].length); 29 | device.install(install_target).catch(function (err) { 30 | console.error('ERROR: ' + err); 31 | process.exit(2); 32 | }); 33 | } else { 34 | console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); 35 | process.exit(2); 36 | } 37 | } else { 38 | device.install().catch(function (err) { 39 | console.error('ERROR: ' + err); 40 | process.exit(2); 41 | }); 42 | } 43 | -------------------------------------------------------------------------------- /cordova/lib/log.js: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | var path = require('path'); 21 | var os = require('os'); 22 | var execa = require('execa'); 23 | var ROOT = path.join(__dirname, '..', '..'); 24 | 25 | /* 26 | * Starts running logcat in the shell. 27 | * Returns a promise. 28 | */ 29 | module.exports.run = function () { 30 | var adb = execa('adb', ['logcat'], { cwd: os.tmpdir(), stderr: 'inherit' }); 31 | 32 | adb.stdout.on('data', function (data) { 33 | var lines = data ? data.toString().split('\n') : []; 34 | var out = lines.filter(function (x) { return x.indexOf('nativeGetEnabledTags') < 0; }); 35 | console.log(out.join('\n')); 36 | }); 37 | 38 | return adb; 39 | }; 40 | 41 | module.exports.help = function () { 42 | console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'cordova', 'log'))); 43 | console.log('Gives the logcat output on the command line.'); 44 | process.exit(0); 45 | }; 46 | -------------------------------------------------------------------------------- /cordova/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var args = process.argv; 23 | var Api = require('./Api'); 24 | var nopt = require('nopt'); 25 | var path = require('path'); 26 | 27 | // Support basic help commands 28 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[2]) >= 0) { 29 | require('./lib/build').help(); 30 | } 31 | 32 | // Do some basic argument parsing 33 | var buildOpts = nopt({ 34 | verbose: Boolean, 35 | silent: Boolean, 36 | debug: Boolean, 37 | release: Boolean, 38 | nobuild: Boolean, 39 | buildConfig: path 40 | }, { d: '--verbose' }); 41 | 42 | // Make buildOptions compatible with PlatformApi build method spec 43 | buildOpts.argv = buildOpts.argv.original; 44 | 45 | require('./loggingHelper').adjustLoggerLevel(buildOpts); 46 | 47 | new Api().build(buildOpts) 48 | .catch(function (err) { 49 | console.error(err.stack); 50 | process.exit(2); 51 | }); 52 | -------------------------------------------------------------------------------- /app/src/main/assets/www/static/js/manifest.bf166f5fd02093e3e37e.js: -------------------------------------------------------------------------------- 1 | !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,d,i,u=0,b=[];u= 0) { 28 | require('./lib/run').help(); 29 | } 30 | 31 | // Do some basic argument parsing 32 | var runOpts = nopt({ 33 | verbose: Boolean, 34 | silent: Boolean, 35 | debug: Boolean, 36 | release: Boolean, 37 | nobuild: Boolean, 38 | buildConfig: path, 39 | archs: String, 40 | device: Boolean, 41 | emulator: Boolean, 42 | target: String 43 | }, { d: '--verbose' }); 44 | 45 | // Make runOptions compatible with PlatformApi run method spec 46 | runOpts.argv = runOpts.argv.remain; 47 | 48 | require('./loggingHelper').adjustLoggerLevel(runOpts); 49 | 50 | new Api().run(runOpts) 51 | .catch(function (err) { 52 | console.error(err, err.stack); 53 | process.exit(2); 54 | }); 55 | -------------------------------------------------------------------------------- /cordova/clean: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* 4 | Licensed to the Apache Software Foundation (ASF) under one 5 | or more contributor license agreements. See the NOTICE file 6 | distributed with this work for additional information 7 | regarding copyright ownership. The ASF licenses this file 8 | to you under the Apache License, Version 2.0 (the 9 | "License"); you may not use this file except in compliance 10 | with the License. You may obtain a copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, 15 | software distributed under the License is distributed on an 16 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | KIND, either express or implied. See the License for the 18 | specific language governing permissions and limitations 19 | under the License. 20 | */ 21 | 22 | var Api = require('./Api'); 23 | var path = require('path'); 24 | var nopt = require('nopt'); 25 | 26 | // Support basic help commands 27 | if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) { 28 | console.log('Usage: ' + path.relative(process.cwd(), process.argv[1])); 29 | console.log('Cleans the project directory.'); 30 | process.exit(0); 31 | } 32 | 33 | // Do some basic argument parsing 34 | var opts = nopt({ 35 | verbose: Boolean, 36 | silent: Boolean 37 | }, { d: '--verbose' }); 38 | 39 | // Make buildOptions compatible with PlatformApi clean method spec 40 | opts.argv = opts.argv.original; 41 | 42 | // Skip cleaning prepared files when not invoking via cordova CLI. 43 | opts.noPrepare = true; 44 | 45 | require('./loggingHelper').adjustLoggerLevel(opts); 46 | 47 | new Api().clean(opts) 48 | .catch(function (err) { 49 | console.error(err.stack); 50 | process.exit(2); 51 | }); 52 | -------------------------------------------------------------------------------- /platform_www/plugins/ionic-plugin-keyboard/www/android/keyboard.js: -------------------------------------------------------------------------------- 1 | cordova.define("ionic-plugin-keyboard.keyboard", function(require, exports, module) { 2 | 3 | var argscheck = require('cordova/argscheck'), 4 | utils = require('cordova/utils'), 5 | exec = require('cordova/exec'), 6 | channel = require('cordova/channel'); 7 | 8 | 9 | var Keyboard = function() { 10 | }; 11 | 12 | Keyboard.hideKeyboardAccessoryBar = function(hide) { 13 | exec(null, null, "Keyboard", "hideKeyboardAccessoryBar", [hide]); 14 | }; 15 | 16 | Keyboard.close = function() { 17 | exec(null, null, "Keyboard", "close", []); 18 | }; 19 | 20 | Keyboard.show = function() { 21 | exec(null, null, "Keyboard", "show", []); 22 | }; 23 | 24 | Keyboard.disableScroll = function(disable) { 25 | exec(null, null, "Keyboard", "disableScroll", [disable]); 26 | }; 27 | 28 | /* 29 | Keyboard.styleDark = function(dark) { 30 | exec(null, null, "Keyboard", "styleDark", [dark]); 31 | }; 32 | */ 33 | 34 | Keyboard.isVisible = false; 35 | 36 | channel.onCordovaReady.subscribe(function() { 37 | exec(success, null, 'Keyboard', 'init', []); 38 | 39 | function success(msg) { 40 | var action = msg.charAt(0); 41 | if ( action === 'S' ) { 42 | var keyboardHeight = msg.substr(1); 43 | cordova.plugins.Keyboard.isVisible = true; 44 | cordova.fireWindowEvent('native.keyboardshow', { 'keyboardHeight': + keyboardHeight }); 45 | 46 | //deprecated 47 | cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': + keyboardHeight }); 48 | } else if ( action === 'H' ) { 49 | cordova.plugins.Keyboard.isVisible = false; 50 | cordova.fireWindowEvent('native.keyboardhide'); 51 | 52 | //deprecated 53 | cordova.fireWindowEvent('native.hidekeyboard'); 54 | } 55 | } 56 | }); 57 | 58 | module.exports = Keyboard; 59 | 60 | 61 | 62 | 63 | }); 64 | -------------------------------------------------------------------------------- /app/src/main/assets/www/plugins/ionic-plugin-keyboard/www/android/keyboard.js: -------------------------------------------------------------------------------- 1 | cordova.define("ionic-plugin-keyboard.keyboard", function(require, exports, module) { 2 | 3 | var argscheck = require('cordova/argscheck'), 4 | utils = require('cordova/utils'), 5 | exec = require('cordova/exec'), 6 | channel = require('cordova/channel'); 7 | 8 | 9 | var Keyboard = function() { 10 | }; 11 | 12 | Keyboard.hideKeyboardAccessoryBar = function(hide) { 13 | exec(null, null, "Keyboard", "hideKeyboardAccessoryBar", [hide]); 14 | }; 15 | 16 | Keyboard.close = function() { 17 | exec(null, null, "Keyboard", "close", []); 18 | }; 19 | 20 | Keyboard.show = function() { 21 | exec(null, null, "Keyboard", "show", []); 22 | }; 23 | 24 | Keyboard.disableScroll = function(disable) { 25 | exec(null, null, "Keyboard", "disableScroll", [disable]); 26 | }; 27 | 28 | /* 29 | Keyboard.styleDark = function(dark) { 30 | exec(null, null, "Keyboard", "styleDark", [dark]); 31 | }; 32 | */ 33 | 34 | Keyboard.isVisible = false; 35 | 36 | channel.onCordovaReady.subscribe(function() { 37 | exec(success, null, 'Keyboard', 'init', []); 38 | 39 | function success(msg) { 40 | var action = msg.charAt(0); 41 | if ( action === 'S' ) { 42 | var keyboardHeight = msg.substr(1); 43 | cordova.plugins.Keyboard.isVisible = true; 44 | cordova.fireWindowEvent('native.keyboardshow', { 'keyboardHeight': + keyboardHeight }); 45 | 46 | //deprecated 47 | cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': + keyboardHeight }); 48 | } else if ( action === 'H' ) { 49 | cordova.plugins.Keyboard.isVisible = false; 50 | cordova.fireWindowEvent('native.keyboardhide'); 51 | 52 | //deprecated 53 | cordova.fireWindowEvent('native.hidekeyboard'); 54 | } 55 | } 56 | }); 57 | 58 | module.exports = Keyboard; 59 | 60 | 61 | 62 | 63 | }); 64 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/CordovaHttpAuthHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import android.webkit.HttpAuthHandler; 22 | 23 | /** 24 | * Specifies interface for HTTP auth handler object which is used to handle auth requests and 25 | * specifying user credentials. 26 | */ 27 | public class CordovaHttpAuthHandler implements ICordovaHttpAuthHandler { 28 | 29 | private final HttpAuthHandler handler; 30 | 31 | public CordovaHttpAuthHandler(HttpAuthHandler handler) { 32 | this.handler = handler; 33 | } 34 | 35 | /** 36 | * Instructs the WebView to cancel the authentication request. 37 | */ 38 | public void cancel () { 39 | this.handler.cancel(); 40 | } 41 | 42 | /** 43 | * Instructs the WebView to proceed with the authentication with the given credentials. 44 | * 45 | * @param username 46 | * @param password 47 | */ 48 | public void proceed (String username, String password) { 49 | this.handler.proceed(username, password); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/java/uk/co/whiteoctober/cordova/AppVersion.java: -------------------------------------------------------------------------------- 1 | package uk.co.whiteoctober.cordova; 2 | 3 | import org.apache.cordova.CordovaPlugin; 4 | import org.apache.cordova.CallbackContext; 5 | import org.json.JSONArray; 6 | import org.json.JSONException; 7 | import org.json.JSONObject; 8 | 9 | import android.content.pm.ApplicationInfo; 10 | import android.content.pm.PackageManager.NameNotFoundException; 11 | import android.content.pm.PackageManager; 12 | 13 | public class AppVersion extends CordovaPlugin { 14 | @Override 15 | public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { 16 | 17 | try { 18 | if (action.equals("getAppName")) { 19 | PackageManager packageManager = this.cordova.getActivity().getPackageManager(); 20 | ApplicationInfo app = packageManager.getApplicationInfo(this.cordova.getActivity().getPackageName(), 0); 21 | callbackContext.success((String)packageManager.getApplicationLabel(app)); 22 | return true; 23 | } 24 | if (action.equals("getPackageName")) { 25 | callbackContext.success(this.cordova.getActivity().getPackageName()); 26 | return true; 27 | } 28 | if (action.equals("getVersionNumber")) { 29 | PackageManager packageManager = this.cordova.getActivity().getPackageManager(); 30 | callbackContext.success(packageManager.getPackageInfo(this.cordova.getActivity().getPackageName(), 0).versionName); 31 | return true; 32 | } 33 | if (action.equals("getVersionCode")) { 34 | PackageManager packageManager = this.cordova.getActivity().getPackageManager(); 35 | callbackContext.success(packageManager.getPackageInfo(this.cordova.getActivity().getPackageName(), 0).versionCode); 36 | return true; 37 | } 38 | return false; 39 | } catch (NameNotFoundException e) { 40 | callbackContext.success("N/A"); 41 | return true; 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /platform_www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = [ 3 | { 4 | "id": "cordova-plugin-app-version.AppVersionPlugin", 5 | "file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js", 6 | "pluginId": "cordova-plugin-app-version", 7 | "clobbers": [ 8 | "cordova.getAppVersion" 9 | ] 10 | }, 11 | { 12 | "id": "cordova-plugin-device.device", 13 | "file": "plugins/cordova-plugin-device/www/device.js", 14 | "pluginId": "cordova-plugin-device", 15 | "clobbers": [ 16 | "device" 17 | ] 18 | }, 19 | { 20 | "id": "cordova-plugin-inappbrowser.inappbrowser", 21 | "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", 22 | "pluginId": "cordova-plugin-inappbrowser", 23 | "clobbers": [ 24 | "cordova.InAppBrowser.open" 25 | ] 26 | }, 27 | { 28 | "id": "cordova-plugin-statusbar.statusbar", 29 | "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", 30 | "pluginId": "cordova-plugin-statusbar", 31 | "clobbers": [ 32 | "window.StatusBar" 33 | ] 34 | }, 35 | { 36 | "id": "cordova-plugin-x-toast.Toast", 37 | "file": "plugins/cordova-plugin-x-toast/www/Toast.js", 38 | "pluginId": "cordova-plugin-x-toast", 39 | "clobbers": [ 40 | "window.plugins.toast" 41 | ] 42 | }, 43 | { 44 | "id": "ionic-plugin-keyboard.keyboard", 45 | "file": "plugins/ionic-plugin-keyboard/www/android/keyboard.js", 46 | "pluginId": "ionic-plugin-keyboard", 47 | "clobbers": [ 48 | "cordova.plugins.Keyboard" 49 | ], 50 | "runs": true 51 | } 52 | ]; 53 | module.exports.metadata = { 54 | "cordova-plugin-whitelist": "1.3.4", 55 | "cordova-plugin-app-version": "0.1.12", 56 | "cordova-plugin-device": "2.0.3", 57 | "cordova-plugin-inappbrowser": "5.0.0", 58 | "cordova-plugin-statusbar": "2.4.3", 59 | "cordova-plugin-x-toast": "2.7.2", 60 | "ionic-plugin-keyboard": "2.2.1" 61 | }; 62 | }); -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/AuthenticationToken.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | /** 22 | * The Class AuthenticationToken defines the userName and password to be used for authenticating a web resource 23 | */ 24 | public class AuthenticationToken { 25 | private String userName; 26 | private String password; 27 | 28 | /** 29 | * Gets the user name. 30 | * 31 | * @return the user name 32 | */ 33 | public String getUserName() { 34 | return userName; 35 | } 36 | 37 | /** 38 | * Sets the user name. 39 | * 40 | * @param userName 41 | * the new user name 42 | */ 43 | public void setUserName(String userName) { 44 | this.userName = userName; 45 | } 46 | 47 | /** 48 | * Gets the password. 49 | * 50 | * @return the password 51 | */ 52 | public String getPassword() { 53 | return password; 54 | } 55 | 56 | /** 57 | * Sets the password. 58 | * 59 | * @param password 60 | * the new password 61 | */ 62 | public void setPassword(String password) { 63 | this.password = password; 64 | } 65 | 66 | 67 | 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/src/main/assets/www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = [ 3 | { 4 | "id": "cordova-plugin-app-version.AppVersionPlugin", 5 | "file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js", 6 | "pluginId": "cordova-plugin-app-version", 7 | "clobbers": [ 8 | "cordova.getAppVersion" 9 | ] 10 | }, 11 | { 12 | "id": "cordova-plugin-device.device", 13 | "file": "plugins/cordova-plugin-device/www/device.js", 14 | "pluginId": "cordova-plugin-device", 15 | "clobbers": [ 16 | "device" 17 | ] 18 | }, 19 | { 20 | "id": "cordova-plugin-inappbrowser.inappbrowser", 21 | "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js", 22 | "pluginId": "cordova-plugin-inappbrowser", 23 | "clobbers": [ 24 | "cordova.InAppBrowser.open" 25 | ] 26 | }, 27 | { 28 | "id": "cordova-plugin-statusbar.statusbar", 29 | "file": "plugins/cordova-plugin-statusbar/www/statusbar.js", 30 | "pluginId": "cordova-plugin-statusbar", 31 | "clobbers": [ 32 | "window.StatusBar" 33 | ] 34 | }, 35 | { 36 | "id": "cordova-plugin-x-toast.Toast", 37 | "file": "plugins/cordova-plugin-x-toast/www/Toast.js", 38 | "pluginId": "cordova-plugin-x-toast", 39 | "clobbers": [ 40 | "window.plugins.toast" 41 | ] 42 | }, 43 | { 44 | "id": "ionic-plugin-keyboard.keyboard", 45 | "file": "plugins/ionic-plugin-keyboard/www/android/keyboard.js", 46 | "pluginId": "ionic-plugin-keyboard", 47 | "clobbers": [ 48 | "cordova.plugins.Keyboard" 49 | ], 50 | "runs": true 51 | } 52 | ]; 53 | module.exports.metadata = { 54 | "cordova-plugin-whitelist": "1.3.4", 55 | "cordova-plugin-app-version": "0.1.12", 56 | "cordova-plugin-device": "2.0.3", 57 | "cordova-plugin-inappbrowser": "5.0.0", 58 | "cordova-plugin-statusbar": "2.4.3", 59 | "cordova-plugin-x-toast": "2.7.2", 60 | "ionic-plugin-keyboard": "2.2.1" 61 | }; 62 | }); -------------------------------------------------------------------------------- /app/src/main/java/org/apache/cordova/inappbrowser/InAppBrowserDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova.inappbrowser; 20 | 21 | import android.app.AlertDialog; 22 | import android.app.Dialog; 23 | import android.content.Context; 24 | 25 | import org.json.JSONException; 26 | import org.json.JSONObject; 27 | 28 | /** 29 | * Created by Oliver on 22/11/2013. 30 | */ 31 | public class InAppBrowserDialog extends Dialog { 32 | Context context; 33 | InAppBrowser inAppBrowser = null; 34 | 35 | public InAppBrowserDialog(Context context, int theme) { 36 | super(context, theme); 37 | this.context = context; 38 | } 39 | 40 | public void setInAppBroswer(InAppBrowser browser) { 41 | this.inAppBrowser = browser; 42 | } 43 | 44 | public void onBackPressed () { 45 | if (this.inAppBrowser == null) { 46 | this.dismiss(); 47 | } else { 48 | // better to go through the in inAppBrowser 49 | // because it does a clean up 50 | if (this.inAppBrowser.hardwareBack() && this.inAppBrowser.canGoBack()) { 51 | this.inAppBrowser.goBack(); 52 | } else { 53 | this.inAppBrowser.closeDialog(); 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova.engine; 21 | 22 | import android.annotation.TargetApi; 23 | import android.os.Build; 24 | import android.webkit.CookieManager; 25 | import android.webkit.WebView; 26 | 27 | import org.apache.cordova.ICordovaCookieManager; 28 | 29 | class SystemCookieManager implements ICordovaCookieManager { 30 | 31 | protected final WebView webView; 32 | private final CookieManager cookieManager; 33 | 34 | public SystemCookieManager(WebView webview) { 35 | webView = webview; 36 | cookieManager = CookieManager.getInstance(); 37 | 38 | cookieManager.setAcceptFileSchemeCookies(true); 39 | cookieManager.setAcceptThirdPartyCookies(webView, true); 40 | } 41 | 42 | public void setCookiesEnabled(boolean accept) { 43 | cookieManager.setAcceptCookie(accept); 44 | } 45 | 46 | public void setCookie(final String url, final String value) { 47 | cookieManager.setCookie(url, value); 48 | } 49 | 50 | public String getCookie(final String url) { 51 | return cookieManager.getCookie(url); 52 | } 53 | 54 | @SuppressWarnings("deprecation") 55 | public void clearCookies() { 56 | cookieManager.removeAllCookies(null); 57 | } 58 | 59 | public void flush() { 60 | cookieManager.flush(); 61 | } 62 | }; 63 | -------------------------------------------------------------------------------- /app/src/main/assets/www/static/css/style.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | .top{ 9 | z-index: 2; 10 | } 11 | .xtop{ 12 | z-index: 100; 13 | } 14 | .white_space{ 15 | white-space: pre-wrap; 16 | } 17 | 18 | 19 | .mb-10{ 20 | margin-bottom: 40; 21 | } 22 | 23 | 24 | 25 | .text_black{ 26 | color: black; 27 | } 28 | .text_white{ 29 | color: white; 30 | } 31 | .text_red{ 32 | color:'#E53935' 33 | } 34 | .text_grey{ 35 | color: #9E9E9E; 36 | } 37 | 38 | 39 | .text_thick{ 40 | font-weight: bold; 41 | } 42 | .text_xthick{ 43 | font-weight: bolder; 44 | } 45 | /* .text_xxthick{ 46 | font-weight: 1000; 47 | } */ 48 | 49 | .text_xsmall{ 50 | font-size: 12px; 51 | } 52 | .text_small---{ 53 | font-size: 13px; 54 | 55 | } 56 | .text_small--{ 57 | font-size: 14px; 58 | } 59 | 60 | .text_small-{ 61 | font-size: 15px; 62 | } 63 | 64 | .text_small{ 65 | font-size: 16px; 66 | } 67 | 68 | .text_middle--{ 69 | font-size: 18px; 70 | } 71 | .text_middle-{ 72 | font-size: 19px; 73 | } 74 | 75 | .text_middle{ 76 | font-size: 20px; 77 | } 78 | 79 | .text_large{ 80 | font-size: 24px; 81 | } 82 | 83 | .text_xlarge{ 84 | font-size: 28px; 85 | } 86 | .text_xxlarge{ 87 | font-size: 36px; 88 | } 89 | .text_xxxlarge{ 90 | font-size: 42px; 91 | } 92 | .text_xxxxlarge{ 93 | font-size: 50px; 94 | } 95 | 96 | .text_FZSSJW{ 97 | font-family: 'FZSSJW'; 98 | } 99 | .text_pingfang{ 100 | font-family: '萍方-简'; 101 | } 102 | .text_fangsong{ 103 | font-family: 'simfang'; 104 | } 105 | 106 | .line_close{ 107 | line-height:0px 108 | } 109 | .line_one{ 110 | display: -webkit-box; 111 | overflow: hidden; 112 | -webkit-line-clamp: 1; 113 | -webkit-box-orient: vertical; 114 | } 115 | .line_two{ 116 | display: -webkit-box; 117 | overflow: hidden; 118 | -webkit-line-clamp: 2; 119 | -webkit-box-orient: vertical; 120 | } 121 | 122 | .line_three{ 123 | display: -webkit-box; 124 | overflow: hidden; 125 | -webkit-line-clamp: 3; 126 | -webkit-box-orient: vertical; 127 | } 128 | 129 | .line_twelve{ 130 | display: -webkit-box; 131 | overflow: hidden; 132 | -webkit-line-clamp: 16; 133 | -webkit-box-orient: vertical; 134 | } 135 | 136 | 137 | 138 | .flex_3{ 139 | flex:33.33% 140 | } 141 | -------------------------------------------------------------------------------- /app/src/main/res/xml/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 火锅底料 28 | 29 | A sample Apache Cordova application that responds to the deviceready event. 30 | 31 | 32 | Apache Cordova Team 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/engine/SystemExposedJsApi.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova.engine; 20 | 21 | import android.webkit.JavascriptInterface; 22 | 23 | import org.apache.cordova.CordovaBridge; 24 | import org.apache.cordova.ExposedJsApi; 25 | import org.json.JSONException; 26 | 27 | /** 28 | * Contains APIs that the JS can call. All functions in here should also have 29 | * an equivalent entry in CordovaChromeClient.java, and be added to 30 | * cordova-js/lib/android/plugin/android/promptbasednativeapi.js 31 | */ 32 | class SystemExposedJsApi implements ExposedJsApi { 33 | private final CordovaBridge bridge; 34 | 35 | SystemExposedJsApi(CordovaBridge bridge) { 36 | this.bridge = bridge; 37 | } 38 | 39 | @JavascriptInterface 40 | public String exec(int bridgeSecret, String service, String action, String callbackId, String arguments) throws JSONException, IllegalAccessException { 41 | return bridge.jsExec(bridgeSecret, service, action, callbackId, arguments); 42 | } 43 | 44 | @JavascriptInterface 45 | public void setNativeToJsBridgeMode(int bridgeSecret, int value) throws IllegalAccessException { 46 | bridge.jsSetNativeToJsBridgeMode(bridgeSecret, value); 47 | } 48 | 49 | @JavascriptInterface 50 | public String retrieveJsMessages(int bridgeSecret, boolean fromOnlineEvent) throws IllegalAccessException { 51 | return bridge.jsRetrieveJsMessages(bridgeSecret, fromOnlineEvent); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/ICordovaClientCertRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import java.security.Principal; 22 | import java.security.PrivateKey; 23 | import java.security.cert.X509Certificate; 24 | 25 | /** 26 | * Specifies interface for handling certificate requests. 27 | */ 28 | public interface ICordovaClientCertRequest { 29 | /** 30 | * Cancel this request 31 | */ 32 | public void cancel(); 33 | 34 | /* 35 | * Returns the host name of the server requesting the certificate. 36 | */ 37 | public String getHost(); 38 | 39 | /* 40 | * Returns the acceptable types of asymmetric keys (can be null). 41 | */ 42 | public String[] getKeyTypes(); 43 | 44 | /* 45 | * Returns the port number of the server requesting the certificate. 46 | */ 47 | public int getPort(); 48 | 49 | /* 50 | * Returns the acceptable certificate issuers for the certificate matching the private key (can be null). 51 | */ 52 | public Principal[] getPrincipals(); 53 | 54 | /* 55 | * Ignore the request for now. Do not remember user's choice. 56 | */ 57 | public void ignore(); 58 | 59 | /* 60 | * Proceed with the specified private key and client certificate chain. Remember the user's positive choice and use it for future requests. 61 | * 62 | * @param privateKey The privateKey 63 | * @param chain The certificate chain 64 | */ 65 | public void proceed(PrivateKey privateKey, X509Certificate[] chain); 66 | } -------------------------------------------------------------------------------- /cordova/lib/plugin-build.gradle: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one 2 | or more contributor license agreements. See the NOTICE file 3 | distributed with this work for additional information 4 | regarding copyright ownership. The ASF licenses this file 5 | to you under the Apache License, Version 2.0 (the 6 | "License"); you may not use this file except in compliance 7 | with the License. You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, 12 | software distributed under the License is distributed on an 13 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | KIND, either express or implied. See the License for the 15 | specific language governing permissions and limitations 16 | under the License. 17 | */ 18 | 19 | // GENERATED FILE! DO NOT EDIT! 20 | 21 | buildscript { 22 | repositories { 23 | google() 24 | jcenter() 25 | } 26 | 27 | // Switch the Android Gradle plugin version requirement depending on the 28 | // installed version of Gradle. This dependency is documented at 29 | // http://tools.android.com/tech-docs/new-build-system/version-compatibility 30 | // and https://issues.apache.org/jira/browse/CB-8143 31 | dependencies { 32 | classpath 'com.android.tools.build:gradle:1.0.0+' 33 | } 34 | } 35 | 36 | apply plugin: 'com.android.library' 37 | 38 | dependencies { 39 | implementation fileTree(dir: 'libs', include: '*.jar') 40 | debugCompile project(path: ":CordovaLib", configuration: "debug") 41 | releaseCompile project(path: ":CordovaLib", configuration: "release") 42 | } 43 | 44 | android { 45 | compileSdkVersion cdvCompileSdkVersion 46 | buildToolsVersion cdvBuildToolsVersion 47 | 48 | compileOptions { 49 | sourceCompatibility JavaVersion.VERSION_1_6 50 | targetCompatibility JavaVersion.VERSION_1_6 51 | } 52 | 53 | sourceSets { 54 | main { 55 | manifest.srcFile 'AndroidManifest.xml' 56 | java.srcDirs = ['src'] 57 | resources.srcDirs = ['src'] 58 | aidl.srcDirs = ['src'] 59 | renderscript.srcDirs = ['src'] 60 | res.srcDirs = ['res'] 61 | assets.srcDirs = ['assets'] 62 | jniLibs.srcDirs = ['libs'] 63 | } 64 | } 65 | } 66 | 67 | if (file('build-extras.gradle').exists()) { 68 | apply from: 'build-extras.gradle' 69 | } 70 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/Config.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | import java.util.List; 23 | 24 | import android.app.Activity; 25 | 26 | @Deprecated // Use Whitelist, CordovaPrefences, etc. directly. 27 | public class Config { 28 | private static final String TAG = "Config"; 29 | 30 | static ConfigXmlParser parser; 31 | 32 | private Config() { 33 | } 34 | 35 | public static void init(Activity action) { 36 | parser = new ConfigXmlParser(); 37 | parser.parse(action); 38 | //TODO: Add feature to bring this back. Some preferences should be overridden by intents, but not all 39 | parser.getPreferences().setPreferencesBundle(action.getIntent().getExtras()); 40 | } 41 | 42 | // Intended to be used for testing only; creates an empty configuration. 43 | public static void init() { 44 | if (parser == null) { 45 | parser = new ConfigXmlParser(); 46 | } 47 | } 48 | 49 | public static String getStartUrl() { 50 | if (parser == null) { 51 | return "file:///android_asset/www/index.html"; 52 | } 53 | return parser.getLaunchUrl(); 54 | } 55 | 56 | public static String getErrorUrl() { 57 | return parser.getPreferences().getString("errorurl", null); 58 | } 59 | 60 | public static List getPluginEntries() { 61 | return parser.getPluginEntries(); 62 | } 63 | 64 | public static CordovaPreferences getPreferences() { 65 | return parser.getPreferences(); 66 | } 67 | 68 | public static boolean isInitialized() { 69 | return parser != null; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /platform_www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js: -------------------------------------------------------------------------------- 1 | cordova.define("cordova-plugin-app-version.AppVersionPlugin", function(require, exports, module) { 2 | /*jslint indent: 2 */ 3 | /*global window, jQuery, angular, cordova */ 4 | "use strict"; 5 | 6 | // Returns a jQuery or AngularJS deferred object, or pass a success and fail callbacks if you don't want to use jQuery or AngularJS 7 | var getPromisedCordovaExec = function (command, success, fail) { 8 | var toReturn, deferred, injector, $q; 9 | if (success === undefined) { 10 | if (window.jQuery) { 11 | deferred = jQuery.Deferred(); 12 | success = deferred.resolve; 13 | fail = deferred.reject; 14 | toReturn = deferred; 15 | } else if (window.angular) { 16 | injector = angular.injector(["ng"]); 17 | $q = injector.get("$q"); 18 | deferred = $q.defer(); 19 | success = deferred.resolve; 20 | fail = deferred.reject; 21 | toReturn = deferred.promise; 22 | } else if (window.when && window.when.promise) { 23 | deferred = when.defer(); 24 | success = deferred.resolve; 25 | fail = deferred.reject; 26 | toReturn = deferred.promise; 27 | } else if (window.Promise) { 28 | toReturn = new Promise(function(c, e) { 29 | success = c; 30 | fail = e; 31 | }); 32 | } else if (window.WinJS && window.WinJS.Promise) { 33 | toReturn = new WinJS.Promise(function(c, e) { 34 | success = c; 35 | fail = e; 36 | }); 37 | } else { 38 | return console.error('AppVersion either needs a success callback, or jQuery/AngularJS/Promise/WinJS.Promise defined for using promises'); 39 | } 40 | } 41 | // 5th param is NOT optional. must be at least empty array 42 | cordova.exec(success, fail, "AppVersion", command, []); 43 | return toReturn; 44 | }; 45 | 46 | var getAppVersion = function (success, fail) { 47 | return getPromisedCordovaExec('getVersionNumber', success, fail); 48 | }; 49 | 50 | getAppVersion.getAppName = function (success, fail) { 51 | return getPromisedCordovaExec('getAppName', success, fail); 52 | }; 53 | 54 | getAppVersion.getPackageName = function (success, fail) { 55 | return getPromisedCordovaExec('getPackageName', success, fail); 56 | }; 57 | 58 | getAppVersion.getVersionNumber = function (success, fail) { 59 | return getPromisedCordovaExec('getVersionNumber', success, fail); 60 | }; 61 | 62 | getAppVersion.getVersionCode = function (success, fail) { 63 | return getPromisedCordovaExec('getVersionCode', success, fail); 64 | }; 65 | 66 | module.exports = getAppVersion; 67 | 68 | }); 69 | -------------------------------------------------------------------------------- /app/src/main/assets/www/plugins/cordova-plugin-app-version/www/AppVersionPlugin.js: -------------------------------------------------------------------------------- 1 | cordova.define("cordova-plugin-app-version.AppVersionPlugin", function(require, exports, module) { 2 | /*jslint indent: 2 */ 3 | /*global window, jQuery, angular, cordova */ 4 | "use strict"; 5 | 6 | // Returns a jQuery or AngularJS deferred object, or pass a success and fail callbacks if you don't want to use jQuery or AngularJS 7 | var getPromisedCordovaExec = function (command, success, fail) { 8 | var toReturn, deferred, injector, $q; 9 | if (success === undefined) { 10 | if (window.jQuery) { 11 | deferred = jQuery.Deferred(); 12 | success = deferred.resolve; 13 | fail = deferred.reject; 14 | toReturn = deferred; 15 | } else if (window.angular) { 16 | injector = angular.injector(["ng"]); 17 | $q = injector.get("$q"); 18 | deferred = $q.defer(); 19 | success = deferred.resolve; 20 | fail = deferred.reject; 21 | toReturn = deferred.promise; 22 | } else if (window.when && window.when.promise) { 23 | deferred = when.defer(); 24 | success = deferred.resolve; 25 | fail = deferred.reject; 26 | toReturn = deferred.promise; 27 | } else if (window.Promise) { 28 | toReturn = new Promise(function(c, e) { 29 | success = c; 30 | fail = e; 31 | }); 32 | } else if (window.WinJS && window.WinJS.Promise) { 33 | toReturn = new WinJS.Promise(function(c, e) { 34 | success = c; 35 | fail = e; 36 | }); 37 | } else { 38 | return console.error('AppVersion either needs a success callback, or jQuery/AngularJS/Promise/WinJS.Promise defined for using promises'); 39 | } 40 | } 41 | // 5th param is NOT optional. must be at least empty array 42 | cordova.exec(success, fail, "AppVersion", command, []); 43 | return toReturn; 44 | }; 45 | 46 | var getAppVersion = function (success, fail) { 47 | return getPromisedCordovaExec('getVersionNumber', success, fail); 48 | }; 49 | 50 | getAppVersion.getAppName = function (success, fail) { 51 | return getPromisedCordovaExec('getAppName', success, fail); 52 | }; 53 | 54 | getAppVersion.getPackageName = function (success, fail) { 55 | return getPromisedCordovaExec('getPackageName', success, fail); 56 | }; 57 | 58 | getAppVersion.getVersionNumber = function (success, fail) { 59 | return getPromisedCordovaExec('getVersionNumber', success, fail); 60 | }; 61 | 62 | getAppVersion.getVersionCode = function (success, fail) { 63 | return getPromisedCordovaExec('getVersionCode', success, fail); 64 | }; 65 | 66 | module.exports = getAppVersion; 67 | 68 | }); 69 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/PluginEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import org.apache.cordova.CordovaPlugin; 22 | 23 | /** 24 | * This class represents a service entry object. 25 | */ 26 | public final class PluginEntry { 27 | 28 | /** 29 | * The name of the service that this plugin implements 30 | */ 31 | public final String service; 32 | 33 | /** 34 | * The plugin class name that implements the service. 35 | */ 36 | public final String pluginClass; 37 | 38 | /** 39 | * The pre-instantiated plugin to use for this entry. 40 | */ 41 | public final CordovaPlugin plugin; 42 | 43 | /** 44 | * Flag that indicates the plugin object should be created when PluginManager is initialized. 45 | */ 46 | public final boolean onload; 47 | 48 | /** 49 | * Constructs with a CordovaPlugin already instantiated. 50 | */ 51 | public PluginEntry(String service, CordovaPlugin plugin) { 52 | this(service, plugin.getClass().getName(), true, plugin); 53 | } 54 | 55 | /** 56 | * @param service The name of the service 57 | * @param pluginClass The plugin class name 58 | * @param onload Create plugin object when HTML page is loaded 59 | */ 60 | public PluginEntry(String service, String pluginClass, boolean onload) { 61 | this(service, pluginClass, onload, null); 62 | } 63 | 64 | private PluginEntry(String service, String pluginClass, boolean onload, CordovaPlugin plugin) { 65 | this.service = service; 66 | this.pluginClass = pluginClass; 67 | this.onload = onload; 68 | this.plugin = plugin; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /cordova/lib/retry.js: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | 'use strict'; 21 | 22 | var events = require('cordova-common').events; 23 | 24 | /* 25 | * Retry a promise-returning function a number of times, propagating its 26 | * results on success or throwing its error on a failed final attempt. 27 | * 28 | * @arg {Number} attemptsLeft - The number of times to retry the passed call. 29 | * @arg {Function} promiseFunction - A function that returns a promise. 30 | * @arg {...} - Arguments to pass to promiseFunction. 31 | * 32 | * @returns {Promise} 33 | */ 34 | module.exports.retryPromise = function (attemptsLeft, promiseFunction) { 35 | // NOTE: 36 | // get all trailing arguments, by skipping the first two (attemptsLeft and 37 | // promiseFunction) because they shouldn't get passed to promiseFunction 38 | var promiseFunctionArguments = Array.prototype.slice.call(arguments, 2); 39 | 40 | return promiseFunction.apply(undefined, promiseFunctionArguments).then( 41 | // on success pass results through 42 | function onFulfilled (value) { 43 | return value; 44 | }, 45 | 46 | // on rejection either retry, or throw the error 47 | function onRejected (error) { 48 | attemptsLeft -= 1; 49 | 50 | if (attemptsLeft < 1) { 51 | throw error; 52 | } 53 | 54 | events.emit('verbose', 'A retried call failed. Retrying ' + attemptsLeft + ' more time(s).'); 55 | 56 | // retry call self again with the same arguments, except attemptsLeft is now lower 57 | var fullArguments = [attemptsLeft, promiseFunction].concat(promiseFunctionArguments); 58 | return module.exports.retryPromise.apply(undefined, fullArguments); 59 | } 60 | ); 61 | }; 62 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/BuildHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | /* 23 | * This is a utility class that allows us to get the BuildConfig variable, which is required 24 | * for the use of different providers. This is not guaranteed to work, and it's better for this 25 | * to be set in the build step in config.xml 26 | * 27 | */ 28 | 29 | import android.app.Activity; 30 | import android.content.Context; 31 | 32 | import java.lang.reflect.Field; 33 | 34 | 35 | public class BuildHelper { 36 | 37 | 38 | private static String TAG="BuildHelper"; 39 | 40 | /* 41 | * This needs to be implemented if you wish to use the Camera Plugin or other plugins 42 | * that read the Build Configuration. 43 | * 44 | * Thanks to Phil@Medtronic and Graham Borland for finding the answer and posting it to 45 | * StackOverflow. This is annoying as hell! However, this method does not work with 46 | * ProGuard, and you should use the config.xml to define the application_id 47 | * 48 | */ 49 | 50 | public static Object getBuildConfigValue(Context ctx, String key) 51 | { 52 | try 53 | { 54 | Class clazz = Class.forName(ctx.getClass().getPackage().getName() + ".BuildConfig"); 55 | Field field = clazz.getField(key); 56 | return field.get(null); 57 | } catch (ClassNotFoundException e) { 58 | LOG.d(TAG, "Unable to get the BuildConfig, is this built with ANT?"); 59 | e.printStackTrace(); 60 | } catch (NoSuchFieldException e) { 61 | LOG.d(TAG, key + " is not a valid field. Check your build.gradle"); 62 | } catch (IllegalAccessException e) { 63 | LOG.d(TAG, "Illegal Access Exception: Let's print a stack trace."); 64 | e.printStackTrace(); 65 | } catch (NullPointerException e) { 66 | LOG.d(TAG, "Null Pointer Exception: Let's print a stack trace."); 67 | e.printStackTrace(); 68 | } 69 | 70 | return null; 71 | } 72 | 73 | } -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/CallbackMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import android.util.Pair; 22 | import android.util.SparseArray; 23 | 24 | /** 25 | * Provides a collection that maps unique request codes to CordovaPlugins and Integers. 26 | * Used to ensure that when plugins make requests for runtime permissions, those requests do not 27 | * collide with requests from other plugins that use the same request code value. 28 | */ 29 | public class CallbackMap { 30 | private int currentCallbackId = 0; 31 | private SparseArray> callbacks; 32 | 33 | public CallbackMap() { 34 | this.callbacks = new SparseArray>(); 35 | } 36 | 37 | /** 38 | * Stores a CordovaPlugin and request code and returns a new unique request code to use 39 | * in a permission request. 40 | * 41 | * @param receiver The plugin that is making the request 42 | * @param requestCode The original request code used by the plugin 43 | * @return A unique request code that can be used to retrieve this callback 44 | * with getAndRemoveCallback() 45 | */ 46 | public synchronized int registerCallback(CordovaPlugin receiver, int requestCode) { 47 | int mappedId = this.currentCallbackId++; 48 | callbacks.put(mappedId, new Pair(receiver, requestCode)); 49 | return mappedId; 50 | } 51 | 52 | /** 53 | * Retrieves and removes a callback stored in the map using the mapped request code 54 | * obtained from registerCallback() 55 | * 56 | * @param mappedId The request code obtained from registerCallback() 57 | * @return The CordovaPlugin and orignal request code that correspond to the 58 | * given mappedCode 59 | */ 60 | public synchronized Pair getAndRemoveCallback(int mappedId) { 61 | Pair callback = callbacks.get(mappedId); 62 | callbacks.remove(mappedId); 63 | return callback; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /platform_www/plugins/cordova-plugin-x-toast/www/Toast.js: -------------------------------------------------------------------------------- 1 | cordova.define("cordova-plugin-x-toast.Toast", function(require, exports, module) { 2 | function Toast() { 3 | } 4 | 5 | Toast.prototype.optionsBuilder = function () { 6 | 7 | // defaults 8 | var message = null; 9 | var duration = "short"; 10 | var position = "center"; 11 | var addPixelsY = 0; 12 | 13 | return { 14 | withMessage: function(m) { 15 | message = m.toString(); 16 | return this; 17 | }, 18 | 19 | withDuration: function(d) { 20 | duration = d.toString(); 21 | return this; 22 | }, 23 | 24 | withPosition: function(p) { 25 | position = p; 26 | return this; 27 | }, 28 | 29 | withAddPixelsY: function(y) { 30 | addPixelsY = y; 31 | return this; 32 | }, 33 | 34 | build: function() { 35 | return { 36 | message: message, 37 | duration: duration, 38 | position: position, 39 | addPixelsY: addPixelsY 40 | }; 41 | } 42 | }; 43 | }; 44 | 45 | 46 | Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) { 47 | options.duration = (options.duration === undefined ? 'long' : options.duration.toString()); 48 | options.message = options.message.toString(); 49 | cordova.exec(successCallback, errorCallback, "Toast", "show", [options]); 50 | }; 51 | 52 | Toast.prototype.show = function (message, duration, position, successCallback, errorCallback) { 53 | this.showWithOptions( 54 | this.optionsBuilder() 55 | .withMessage(message) 56 | .withDuration(duration) 57 | .withPosition(position) 58 | .build(), 59 | successCallback, 60 | errorCallback); 61 | }; 62 | 63 | Toast.prototype.showShortTop = function (message, successCallback, errorCallback) { 64 | this.show(message, "short", "top", successCallback, errorCallback); 65 | }; 66 | 67 | Toast.prototype.showShortCenter = function (message, successCallback, errorCallback) { 68 | this.show(message, "short", "center", successCallback, errorCallback); 69 | }; 70 | 71 | Toast.prototype.showShortBottom = function (message, successCallback, errorCallback) { 72 | this.show(message, "short", "bottom", successCallback, errorCallback); 73 | }; 74 | 75 | Toast.prototype.showLongTop = function (message, successCallback, errorCallback) { 76 | this.show(message, "long", "top", successCallback, errorCallback); 77 | }; 78 | 79 | Toast.prototype.showLongCenter = function (message, successCallback, errorCallback) { 80 | this.show(message, "long", "center", successCallback, errorCallback); 81 | }; 82 | 83 | Toast.prototype.showLongBottom = function (message, successCallback, errorCallback) { 84 | this.show(message, "long", "bottom", successCallback, errorCallback); 85 | }; 86 | 87 | Toast.prototype.hide = function (successCallback, errorCallback) { 88 | cordova.exec(successCallback, errorCallback, "Toast", "hide", []); 89 | }; 90 | 91 | Toast.install = function () { 92 | if (!window.plugins) { 93 | window.plugins = {}; 94 | } 95 | 96 | window.plugins.toast = new Toast(); 97 | return window.plugins.toast; 98 | }; 99 | 100 | cordova.addConstructor(Toast.install); 101 | }); 102 | -------------------------------------------------------------------------------- /app/src/main/assets/www/plugins/cordova-plugin-x-toast/www/Toast.js: -------------------------------------------------------------------------------- 1 | cordova.define("cordova-plugin-x-toast.Toast", function(require, exports, module) { 2 | function Toast() { 3 | } 4 | 5 | Toast.prototype.optionsBuilder = function () { 6 | 7 | // defaults 8 | var message = null; 9 | var duration = "short"; 10 | var position = "center"; 11 | var addPixelsY = 0; 12 | 13 | return { 14 | withMessage: function(m) { 15 | message = m.toString(); 16 | return this; 17 | }, 18 | 19 | withDuration: function(d) { 20 | duration = d.toString(); 21 | return this; 22 | }, 23 | 24 | withPosition: function(p) { 25 | position = p; 26 | return this; 27 | }, 28 | 29 | withAddPixelsY: function(y) { 30 | addPixelsY = y; 31 | return this; 32 | }, 33 | 34 | build: function() { 35 | return { 36 | message: message, 37 | duration: duration, 38 | position: position, 39 | addPixelsY: addPixelsY 40 | }; 41 | } 42 | }; 43 | }; 44 | 45 | 46 | Toast.prototype.showWithOptions = function (options, successCallback, errorCallback) { 47 | options.duration = (options.duration === undefined ? 'long' : options.duration.toString()); 48 | options.message = options.message.toString(); 49 | cordova.exec(successCallback, errorCallback, "Toast", "show", [options]); 50 | }; 51 | 52 | Toast.prototype.show = function (message, duration, position, successCallback, errorCallback) { 53 | this.showWithOptions( 54 | this.optionsBuilder() 55 | .withMessage(message) 56 | .withDuration(duration) 57 | .withPosition(position) 58 | .build(), 59 | successCallback, 60 | errorCallback); 61 | }; 62 | 63 | Toast.prototype.showShortTop = function (message, successCallback, errorCallback) { 64 | this.show(message, "short", "top", successCallback, errorCallback); 65 | }; 66 | 67 | Toast.prototype.showShortCenter = function (message, successCallback, errorCallback) { 68 | this.show(message, "short", "center", successCallback, errorCallback); 69 | }; 70 | 71 | Toast.prototype.showShortBottom = function (message, successCallback, errorCallback) { 72 | this.show(message, "short", "bottom", successCallback, errorCallback); 73 | }; 74 | 75 | Toast.prototype.showLongTop = function (message, successCallback, errorCallback) { 76 | this.show(message, "long", "top", successCallback, errorCallback); 77 | }; 78 | 79 | Toast.prototype.showLongCenter = function (message, successCallback, errorCallback) { 80 | this.show(message, "long", "center", successCallback, errorCallback); 81 | }; 82 | 83 | Toast.prototype.showLongBottom = function (message, successCallback, errorCallback) { 84 | this.show(message, "long", "bottom", successCallback, errorCallback); 85 | }; 86 | 87 | Toast.prototype.hide = function (successCallback, errorCallback) { 88 | cordova.exec(successCallback, errorCallback, "Toast", "hide", []); 89 | }; 90 | 91 | Toast.install = function () { 92 | if (!window.plugins) { 93 | window.plugins = {}; 94 | } 95 | 96 | window.plugins.toast = new Toast(); 97 | return window.plugins.toast; 98 | }; 99 | 100 | cordova.addConstructor(Toast.install); 101 | }); 102 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/ResumeCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | 22 | import org.json.JSONException; 23 | import org.json.JSONObject; 24 | 25 | import java.util.ArrayList; 26 | import java.util.List; 27 | 28 | public class ResumeCallback extends CallbackContext { 29 | private final String TAG = "CordovaResumeCallback"; 30 | private String serviceName; 31 | private PluginManager pluginManager; 32 | 33 | public ResumeCallback(String serviceName, PluginManager pluginManager) { 34 | super("resumecallback", null); 35 | this.serviceName = serviceName; 36 | this.pluginManager = pluginManager; 37 | } 38 | 39 | @Override 40 | public void sendPluginResult(PluginResult pluginResult) { 41 | synchronized (this) { 42 | if (finished) { 43 | LOG.w(TAG, serviceName + " attempted to send a second callback to ResumeCallback\nResult was: " + pluginResult.getMessage()); 44 | return; 45 | } else { 46 | finished = true; 47 | } 48 | } 49 | 50 | JSONObject event = new JSONObject(); 51 | JSONObject pluginResultObject = new JSONObject(); 52 | 53 | try { 54 | pluginResultObject.put("pluginServiceName", this.serviceName); 55 | pluginResultObject.put("pluginStatus", PluginResult.StatusMessages[pluginResult.getStatus()]); 56 | 57 | event.put("action", "resume"); 58 | event.put("pendingResult", pluginResultObject); 59 | } catch (JSONException e) { 60 | LOG.e(TAG, "Unable to create resume object for Activity Result"); 61 | } 62 | 63 | PluginResult eventResult = new PluginResult(PluginResult.Status.OK, event); 64 | 65 | // We send a list of results to the js so that we don't have to decode 66 | // the PluginResult passed to this CallbackContext into JSON twice. 67 | // The results are combined into an event payload before the event is 68 | // fired on the js side of things (see platform.js) 69 | List result = new ArrayList(); 70 | result.add(eventResult); 71 | result.add(pluginResult); 72 | 73 | CoreAndroid appPlugin = (CoreAndroid) pluginManager.getPlugin(CoreAndroid.PLUGIN_NAME); 74 | appPlugin.sendResumeEvent(new PluginResult(PluginResult.Status.OK, result)); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/engine/SystemWebView.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova.engine; 21 | 22 | import android.content.Context; 23 | import android.util.AttributeSet; 24 | import android.view.KeyEvent; 25 | import android.webkit.WebChromeClient; 26 | import android.webkit.WebView; 27 | import android.webkit.WebViewClient; 28 | 29 | import org.apache.cordova.CordovaInterface; 30 | import org.apache.cordova.CordovaWebView; 31 | import org.apache.cordova.CordovaWebViewEngine; 32 | 33 | /** 34 | * Custom WebView subclass that enables us to capture events needed for Cordova. 35 | */ 36 | public class SystemWebView extends WebView implements CordovaWebViewEngine.EngineView { 37 | private SystemWebViewClient viewClient; 38 | SystemWebChromeClient chromeClient; 39 | private SystemWebViewEngine parentEngine; 40 | private CordovaInterface cordova; 41 | 42 | public SystemWebView(Context context) { 43 | this(context, null); 44 | } 45 | 46 | public SystemWebView(Context context, AttributeSet attrs) { 47 | super(context, attrs); 48 | } 49 | 50 | // Package visibility to enforce that only SystemWebViewEngine should call this method. 51 | void init(SystemWebViewEngine parentEngine, CordovaInterface cordova) { 52 | this.cordova = cordova; 53 | this.parentEngine = parentEngine; 54 | if (this.viewClient == null) { 55 | setWebViewClient(new SystemWebViewClient(parentEngine)); 56 | } 57 | 58 | if (this.chromeClient == null) { 59 | setWebChromeClient(new SystemWebChromeClient(parentEngine)); 60 | } 61 | } 62 | 63 | @Override 64 | public CordovaWebView getCordovaWebView() { 65 | return parentEngine != null ? parentEngine.getCordovaWebView() : null; 66 | } 67 | 68 | @Override 69 | public void setWebViewClient(WebViewClient client) { 70 | viewClient = (SystemWebViewClient)client; 71 | super.setWebViewClient(client); 72 | } 73 | 74 | @Override 75 | public void setWebChromeClient(WebChromeClient client) { 76 | chromeClient = (SystemWebChromeClient)client; 77 | super.setWebChromeClient(client); 78 | } 79 | 80 | @Override 81 | public boolean dispatchKeyEvent(KeyEvent event) { 82 | Boolean ret = parentEngine.client.onDispatchKeyEvent(event); 83 | if (ret != null) { 84 | return ret.booleanValue(); 85 | } 86 | return super.dispatchKeyEvent(event); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/CordovaWebViewEngine.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import android.view.KeyEvent; 22 | import android.view.View; 23 | import android.webkit.ValueCallback; 24 | 25 | /** 26 | * Interface for all Cordova engines. 27 | * No methods will be added to this class (in order to be compatible with existing engines). 28 | * Instead, we will create a new interface: e.g. CordovaWebViewEngineV2 29 | */ 30 | public interface CordovaWebViewEngine { 31 | void init(CordovaWebView parentWebView, CordovaInterface cordova, Client client, 32 | CordovaResourceApi resourceApi, PluginManager pluginManager, 33 | NativeToJsMessageQueue nativeToJsMessageQueue); 34 | 35 | CordovaWebView getCordovaWebView(); 36 | ICordovaCookieManager getCookieManager(); 37 | View getView(); 38 | 39 | void loadUrl(String url, boolean clearNavigationStack); 40 | 41 | void stopLoading(); 42 | 43 | /** Return the currently loaded URL */ 44 | String getUrl(); 45 | 46 | void clearCache(); 47 | 48 | /** After calling clearHistory(), canGoBack() should be false. */ 49 | void clearHistory(); 50 | 51 | boolean canGoBack(); 52 | 53 | /** Returns whether a navigation occurred */ 54 | boolean goBack(); 55 | 56 | /** Pauses / resumes the WebView's event loop. */ 57 | void setPaused(boolean value); 58 | 59 | /** Clean up all resources associated with the WebView. */ 60 | void destroy(); 61 | 62 | /** Add the evaulate Javascript method **/ 63 | void evaluateJavascript(String js, ValueCallback callback); 64 | 65 | /** 66 | * Used to retrieve the associated CordovaWebView given a View without knowing the type of Engine. 67 | * E.g. ((CordovaWebView.EngineView)activity.findViewById(android.R.id.webView)).getCordovaWebView(); 68 | */ 69 | public interface EngineView { 70 | CordovaWebView getCordovaWebView(); 71 | } 72 | 73 | /** 74 | * Contains methods that an engine uses to communicate with the parent CordovaWebView. 75 | * Methods may be added in future cordova versions, but never removed. 76 | */ 77 | public interface Client { 78 | Boolean onDispatchKeyEvent(KeyEvent event); 79 | void clearLoadTimeoutTimer(); 80 | void onPageStarted(String newUrl); 81 | void onReceivedError(int errorCode, String description, String failingUrl); 82 | void onPageFinishedLoading(String url); 83 | boolean onNavigationAttempt(String url); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /platform_www/plugins/cordova-plugin-device/www/device.js: -------------------------------------------------------------------------------- 1 | cordova.define("cordova-plugin-device.device", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | 23 | var argscheck = require('cordova/argscheck'); 24 | var channel = require('cordova/channel'); 25 | var utils = require('cordova/utils'); 26 | var exec = require('cordova/exec'); 27 | var cordova = require('cordova'); 28 | 29 | channel.createSticky('onCordovaInfoReady'); 30 | // Tell cordova channel to wait on the CordovaInfoReady event 31 | channel.waitForInitialization('onCordovaInfoReady'); 32 | 33 | /** 34 | * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the 35 | * phone, etc. 36 | * @constructor 37 | */ 38 | function Device () { 39 | this.available = false; 40 | this.platform = null; 41 | this.version = null; 42 | this.uuid = null; 43 | this.cordova = null; 44 | this.model = null; 45 | this.manufacturer = null; 46 | this.isVirtual = null; 47 | this.serial = null; 48 | 49 | var me = this; 50 | 51 | channel.onCordovaReady.subscribe(function () { 52 | me.getInfo(function (info) { 53 | // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js 54 | // TODO: CB-5105 native implementations should not return info.cordova 55 | var buildLabel = cordova.version; 56 | me.available = true; 57 | me.platform = info.platform; 58 | me.version = info.version; 59 | me.uuid = info.uuid; 60 | me.cordova = buildLabel; 61 | me.model = info.model; 62 | me.isVirtual = info.isVirtual; 63 | me.manufacturer = info.manufacturer || 'unknown'; 64 | me.serial = info.serial || 'unknown'; 65 | channel.onCordovaInfoReady.fire(); 66 | }, function (e) { 67 | me.available = false; 68 | utils.alert('[ERROR] Error initializing Cordova: ' + e); 69 | }); 70 | }); 71 | } 72 | 73 | /** 74 | * Get device info 75 | * 76 | * @param {Function} successCallback The function to call when the heading data is available 77 | * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL) 78 | */ 79 | Device.prototype.getInfo = function (successCallback, errorCallback) { 80 | argscheck.checkArgs('fF', 'Device.getInfo', arguments); 81 | exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []); 82 | }; 83 | 84 | module.exports = new Device(); 85 | 86 | }); 87 | -------------------------------------------------------------------------------- /app/src/main/assets/www/plugins/cordova-plugin-device/www/device.js: -------------------------------------------------------------------------------- 1 | cordova.define("cordova-plugin-device.device", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | 23 | var argscheck = require('cordova/argscheck'); 24 | var channel = require('cordova/channel'); 25 | var utils = require('cordova/utils'); 26 | var exec = require('cordova/exec'); 27 | var cordova = require('cordova'); 28 | 29 | channel.createSticky('onCordovaInfoReady'); 30 | // Tell cordova channel to wait on the CordovaInfoReady event 31 | channel.waitForInitialization('onCordovaInfoReady'); 32 | 33 | /** 34 | * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the 35 | * phone, etc. 36 | * @constructor 37 | */ 38 | function Device () { 39 | this.available = false; 40 | this.platform = null; 41 | this.version = null; 42 | this.uuid = null; 43 | this.cordova = null; 44 | this.model = null; 45 | this.manufacturer = null; 46 | this.isVirtual = null; 47 | this.serial = null; 48 | 49 | var me = this; 50 | 51 | channel.onCordovaReady.subscribe(function () { 52 | me.getInfo(function (info) { 53 | // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js 54 | // TODO: CB-5105 native implementations should not return info.cordova 55 | var buildLabel = cordova.version; 56 | me.available = true; 57 | me.platform = info.platform; 58 | me.version = info.version; 59 | me.uuid = info.uuid; 60 | me.cordova = buildLabel; 61 | me.model = info.model; 62 | me.isVirtual = info.isVirtual; 63 | me.manufacturer = info.manufacturer || 'unknown'; 64 | me.serial = info.serial || 'unknown'; 65 | channel.onCordovaInfoReady.fire(); 66 | }, function (e) { 67 | me.available = false; 68 | utils.alert('[ERROR] Error initializing Cordova: ' + e); 69 | }); 70 | }); 71 | } 72 | 73 | /** 74 | * Get device info 75 | * 76 | * @param {Function} successCallback The function to call when the heading data is available 77 | * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL) 78 | */ 79 | Device.prototype.getInfo = function (successCallback, errorCallback) { 80 | argscheck.checkArgs('fF', 'Device.getInfo', arguments); 81 | exec(successCallback, errorCallback, 'Device', 'getDeviceInfo', []); 82 | }; 83 | 84 | module.exports = new Device(); 85 | 86 | }); 87 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import java.security.Principal; 22 | import java.security.PrivateKey; 23 | import java.security.cert.X509Certificate; 24 | 25 | import android.annotation.SuppressLint; 26 | import android.webkit.ClientCertRequest; 27 | 28 | /** 29 | * Implementation of the ICordovaClientCertRequest for Android WebView. 30 | * 31 | */ 32 | public class CordovaClientCertRequest implements ICordovaClientCertRequest { 33 | 34 | private final ClientCertRequest request; 35 | 36 | public CordovaClientCertRequest(ClientCertRequest request) { 37 | this.request = request; 38 | } 39 | 40 | /** 41 | * Cancel this request 42 | */ 43 | @SuppressLint("NewApi") 44 | public void cancel() 45 | { 46 | request.cancel(); 47 | } 48 | 49 | /* 50 | * Returns the host name of the server requesting the certificate. 51 | */ 52 | @SuppressLint("NewApi") 53 | public String getHost() 54 | { 55 | return request.getHost(); 56 | } 57 | 58 | /* 59 | * Returns the acceptable types of asymmetric keys (can be null). 60 | */ 61 | @SuppressLint("NewApi") 62 | public String[] getKeyTypes() 63 | { 64 | return request.getKeyTypes(); 65 | } 66 | 67 | /* 68 | * Returns the port number of the server requesting the certificate. 69 | */ 70 | @SuppressLint("NewApi") 71 | public int getPort() 72 | { 73 | return request.getPort(); 74 | } 75 | 76 | /* 77 | * Returns the acceptable certificate issuers for the certificate matching the private key (can be null). 78 | */ 79 | @SuppressLint("NewApi") 80 | public Principal[] getPrincipals() 81 | { 82 | return request.getPrincipals(); 83 | } 84 | 85 | /* 86 | * Ignore the request for now. Do not remember user's choice. 87 | */ 88 | @SuppressLint("NewApi") 89 | public void ignore() 90 | { 91 | request.ignore(); 92 | } 93 | 94 | /* 95 | * Proceed with the specified private key and client certificate chain. Remember the user's positive choice and use it for future requests. 96 | * 97 | * @param privateKey The privateKey 98 | * @param chain The certificate chain 99 | */ 100 | @SuppressLint("NewApi") 101 | public void proceed(PrivateKey privateKey, X509Certificate[] chain) 102 | { 103 | request.proceed(privateKey, chain); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /app/src/main/assets/www/static/js/9.9f8e0c08bd9a414caf13.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([9],{"BM+Y":function(t,e){},YGle:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("IHPB"),r=s.n(a),n=s("wst3"),o=s("0T5Q"),i={name:"historyComments",components:{MescrollVue:n.a},data:function(){return{mescrollDown:{callback:this.refreshData},mescrollUp:{callback:this.getMoreData,noMoreSize:3,empty:{warpId:"noMoreDataWrap",icon:null,tip:"暂无历史评论",btntext:"",btnClick:null,supportTap:!1}},historyComments:[]}},methods:{timeFormat:function(t){var e=Math.floor(((new Date).getTime()-new Date(t).getTime())/1e3),s=Math.floor(e/3600/24),a=Math.floor(e/3600)%24,r=Math.floor(e/60)%60,n=Math.floor(e%60),o="";if(n>0&&0==r&&0==a&&0==s)o=n+"秒前";else if(r>0&&0==a&&0==s)o=r+"分钟前";else{if(!(a>0&&0==s))return new Date(new Date(t).getTime()+288e5).toJSON().substr(0,16).replace("T"," ");o=a+"小时前"}return o},refreshData:function(t){var e=this;e.$request("get","/user/getHistoryComments",{}).then(function(s){console.log(s),e.historyComments=s.data,t.endSuccess()}).catch(function(e){console.log(e),t.endErr()})},getMoreData:function(t,e){var s=this,a=s.historyComments.length>0?new Date(s.historyComments[s.historyComments.length-1].created_time).getTime():(new Date).getTime();s.$request("get","/user/getHistoryComments",{timeToken:a}).then(function(a){var n;1===t.num&&(s.historyComments=[]),(n=s.historyComments).push.apply(n,r()(a.data)),e.endSuccess(a.data.length)}).catch(function(t){console.log(t),e.endErr()})},rightSlide:function(){this.$router.go(-1)}},directives:{touch:o.a}},l={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-container",{staticClass:"d-flex flex-column px-0"},[s("v-app-bar",{staticClass:"top",attrs:{fixed:"",app:"",color:"white"}},[s("v-btn",{staticClass:"mt-2",attrs:{fab:"",text:"",small:""},on:{click:function(e){return t.$router.back(-1)}}},[s("v-icon",{attrs:{large:""}},[t._v("mdi-arrow-left")])],1),t._v(" "),s("span",{staticClass:"text_middle mt-2"},[t._v("历史评论")])],1),t._v(" "),s("div",{directives:[{name:"touch",rawName:"v-touch:swiperight",value:t.rightSlide,expression:"rightSlide",arg:"swiperight"}],staticClass:"mescroll_container_historyComments",staticStyle:{"background-color":"#f5f5f5"}},[s("mescroll-vue",{ref:"mescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp}},[s("div",{attrs:{id:"noMoreDataWrap"}}),t._v(" "),t._l(t.historyComments,function(e,a){return s("v-card",{key:a,staticClass:"mt-2",attrs:{color:"white",width:"100%",flat:"",rounded:""},on:{click:function(s){return t.$router.push({path:"/postDetail",query:{id:e.postId}})}}},[s("v-card-text",{staticClass:"d-flex flex-column py-2"},[s("div",{staticClass:"d-flex"},[s("v-avatar",{staticClass:"ml-3 mb-1",attrs:{size:"40"}},[s("img",{attrs:{src:e.avatar,alt:"头像"}})]),t._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("span",{staticClass:"text_small-- text_thick ml-2"},[t._v("#"+t._s(e.name))]),t._v(" "),s("span",{staticClass:"text_small--- ml-2 grey--text mt-n1"},[t._v(t._s(t.timeFormat(e.created_time)))])])],1),t._v(" "),s("div",[s("span",{staticClass:"text_thick black--text"},[t._v("【我的回复】:")]),t._v(" "),s("span",{staticClass:"black--text"},[t._v(t._s(e.content))]),t._v(" "),e.image?s("span",[s("span",{staticClass:"ml-2"},[t._v("[图片]")])]):t._e()]),t._v(" "),s("span",{staticClass:"text_small-- black--text grey_background_historyComments pa-1"},[s("span",{staticClass:"text_thick"},[t._v("【帖子】")]),t._v("\n "+t._s(e.title)+"\n ")])])],1)})],2)],1)],1)},staticRenderFns:[]};var c=s("C7Lr")(i,l,!1,function(t){s("BM+Y")},null,null);e.default=c.exports}}); 2 | //# sourceMappingURL=9.9f8e0c08bd9a414caf13.js.map -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/CordovaPreferences.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package org.apache.cordova; 21 | 22 | import java.util.HashMap; 23 | import java.util.Locale; 24 | import java.util.Map; 25 | 26 | import org.apache.cordova.LOG; 27 | 28 | import android.app.Activity; 29 | import android.os.Bundle; 30 | 31 | public class CordovaPreferences { 32 | private HashMap prefs = new HashMap(20); 33 | private Bundle preferencesBundleExtras; 34 | 35 | public void setPreferencesBundle(Bundle extras) { 36 | preferencesBundleExtras = extras; 37 | } 38 | 39 | public void set(String name, String value) { 40 | prefs.put(name.toLowerCase(Locale.ENGLISH), value); 41 | } 42 | 43 | public void set(String name, boolean value) { 44 | set(name, "" + value); 45 | } 46 | 47 | public void set(String name, int value) { 48 | set(name, "" + value); 49 | } 50 | 51 | public void set(String name, double value) { 52 | set(name, "" + value); 53 | } 54 | 55 | public Map getAll() { 56 | return prefs; 57 | } 58 | 59 | public boolean getBoolean(String name, boolean defaultValue) { 60 | name = name.toLowerCase(Locale.ENGLISH); 61 | String value = prefs.get(name); 62 | if (value != null) { 63 | return Boolean.parseBoolean(value); 64 | } 65 | return defaultValue; 66 | } 67 | 68 | // Added in 4.0.0 69 | public boolean contains(String name) { 70 | return getString(name, null) != null; 71 | } 72 | 73 | public int getInteger(String name, int defaultValue) { 74 | name = name.toLowerCase(Locale.ENGLISH); 75 | String value = prefs.get(name); 76 | if (value != null) { 77 | // Use Integer.decode() can't handle it if the highest bit is set. 78 | return (int)(long)Long.decode(value); 79 | } 80 | return defaultValue; 81 | } 82 | 83 | public double getDouble(String name, double defaultValue) { 84 | name = name.toLowerCase(Locale.ENGLISH); 85 | String value = prefs.get(name); 86 | if (value != null) { 87 | return Double.valueOf(value); 88 | } 89 | return defaultValue; 90 | } 91 | 92 | public String getString(String name, String defaultValue) { 93 | name = name.toLowerCase(Locale.ENGLISH); 94 | String value = prefs.get(name); 95 | if (value != null) { 96 | return value; 97 | } 98 | return defaultValue; 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /cordova/lib/utils.js: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | /* 21 | Provides a set of utility methods, which can also be spied on during unit tests. 22 | */ 23 | 24 | // TODO: Perhaps this should live in cordova-common? 25 | 26 | const fs = require('fs-extra'); 27 | const path = require('path'); 28 | 29 | /** 30 | * Reads, searches, and replaces the found occurences with replacementString and then writes the file back out. 31 | * A backup is not made. 32 | * 33 | * @param {string} file A file path to a readable & writable file 34 | * @param {RegExp} searchRegex The search regex 35 | * @param {string} replacementString The string to replace the found occurences 36 | * @returns void 37 | */ 38 | exports.replaceFileContents = function (file, searchRegex, replacementString) { 39 | let contents = fs.readFileSync(file).toString(); 40 | contents = contents.replace(searchRegex, replacementString); 41 | fs.writeFileSync(file, contents); 42 | }; 43 | 44 | /** 45 | * Reads a file and scans for regex. Returns the line of the first occurence or null if no occurences are found. 46 | * 47 | * @param {string} file A file path 48 | * @param {RegExp} regex A search regex 49 | * @returns string|null 50 | */ 51 | exports.grep = function (file, regex) { 52 | const contents = fs.readFileSync(file).toString().replace(/\\r/g, '').split('\n'); 53 | for (let i = 0; i < contents.length; i++) { 54 | const line = contents[i]; 55 | if (regex.test(line)) { 56 | return line; 57 | } 58 | } 59 | return null; 60 | }; 61 | 62 | /** 63 | * Scans directories and outputs a list of found paths that matches the regex 64 | * 65 | * @param {string} directory The starting directory 66 | * @param {RegExp} regex The search regex 67 | * @param {boolean} recursive Enables recursion 68 | * @returns Array 69 | */ 70 | exports.scanDirectory = function (directory, regex, recursive) { 71 | let output = []; 72 | 73 | if (fs.existsSync(directory)) { 74 | const items = fs.readdirSync(directory); 75 | 76 | for (let i = 0; i < items.length; i++) { 77 | const item = items[i]; 78 | const itemPath = path.join(directory, item); 79 | const stats = fs.statSync(itemPath); 80 | 81 | if (regex.test(itemPath)) { 82 | output.push(itemPath); 83 | } 84 | 85 | if (stats.isDirectory()) { 86 | if (recursive) { 87 | output = output.concat(exports.scanDirectory(itemPath, regex, recursive)); 88 | } else { 89 | // Move onto the next item 90 | continue; 91 | } 92 | } 93 | } 94 | } 95 | 96 | return output; 97 | }; 98 | -------------------------------------------------------------------------------- /app/src/main/assets/www/static/js/10.1848fe390d228d243769.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([10],{NOO7:function(t,e){},df0t:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("IHPB"),l=a.n(s),r=a("RzMJ"),n=a("wst3"),c=a("0T5Q"),o={name:"myCollect",components:{MescrollVue:n.a},data:function(){return{myCollects:[],snackbar:{show:!1,message:"",color:"grey-darken3"},map:r.a,mescrollDown:{callback:this.refreshData,use:!0},mescrollUp:{callback:this.getMoreData,noMoreSize:3,empty:{warpId:"noMoreDataWrap",icon:null,tip:"暂无收藏帖子",btntext:"",btnClick:null,supportTap:!1}}}},created:function(){},methods:{rightSlide:function(){this.$router.go(-1)},timeFormat:function(t){var e=Math.floor(((new Date).getTime()-new Date(t).getTime())/1e3),a=Math.floor(e/3600/24),s=Math.floor(e/3600)%24,l=Math.floor(e/60)%60,r=Math.floor(e%60),n="";if(r>0&&0==l&&0==s&&0==a)n=r+"秒前";else if(l>0&&0==s&&0==a)n=l+"分钟前";else{if(!(s>0&&0==a))return new Date(new Date(t).getTime()+288e5).toJSON().substr(0,16).replace("T"," ");n=s+"小时前"}return n},refreshData:function(t){var e=this;e.$request("get","/forum/getMyCollect",{timeToken:(new Date).getTime()}).then(function(a){e.myCollects=a.data,t.endSuccess(a.data.length)}).catch(function(e){t.endErr()})},getMoreData:function(t,e){var a=this,s=a.myCollects.length>0?new Date(a.myCollects[a.myCollects.length-1].created_time).getTime():(new Date).getTime();a.$request("get","/forum/getMyCollect",{timeToken:s}).then(function(s){var r;1===t.num&&(a.myCollects=[]),(r=a.myCollects).push.apply(r,l()(s.data)),e.endSuccess(s.data.length)}).catch(function(t){e.endErr()})}},directives:{touch:c.a}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-container",{staticClass:"d-flex flex-column px-0"},[a("v-app-bar",{staticClass:"top",attrs:{fixed:"",app:"",color:"white"}},[a("v-btn",{staticClass:"mt-2",attrs:{fab:"",text:"",small:""},on:{click:function(e){return t.$router.back(-1)}}},[a("v-icon",{attrs:{large:""}},[t._v("mdi-arrow-left")])],1),t._v(" "),a("span",{staticClass:"text_middle mt-2"},[t._v("我的收藏")])],1),t._v(" "),a("div",{directives:[{name:"touch",rawName:"v-touch:swiperight",value:t.rightSlide,expression:"rightSlide",arg:"swiperight"}],ref:"viewBox",staticClass:"mescroll_container_historyPosts"},[a("mescroll-vue",{ref:"mescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp}},[a("div",{attrs:{id:"noMoreDataWrap"}}),t._v(" "),t._l(t.myCollects,function(e,s){return a("v-card",{key:s,staticClass:"mt-2",attrs:{color:"white",width:"100%",flat:"",rounded:""},on:{click:function(a){return t.$router.push({path:"/postDetail",query:{id:e.id}})}}},[a("v-card-text",{staticClass:"d-flex flex-column pt-2 pb-4"},[a("div",{staticClass:"d-flex"},[a("v-avatar",{staticClass:"ml-3 mb-1",attrs:{size:"40"}},[a("img",{attrs:{src:e.avatar,alt:"头像"}})]),t._v(" "),a("div",{staticClass:"d-flex flex-column"},[a("span",{staticClass:"text_small-- text_thick ml-2"},[t._v("#"+t._s(e.name))]),t._v(" "),a("span",{staticClass:"text_small--- ml-2 grey--text mt-n1"},[t._v(t._s(t.timeFormat(e.created_time)))])])],1),t._v(" "),a("span",{staticClass:"text_small-- black--text"},[a("span",{staticClass:"text_thick"},[t._v("【帖子】 "+t._s(e.title))])]),t._v(" "),a("div",{staticClass:"grey_background_historyPosts pa-1"},[a("span",{staticClass:"text_thick"},[t._v("【内容】:")]),t._v(" "),a("span",{staticClass:"black--text"},[t._v(t._s(e.content))])])])],1)})],2)],1),t._v(" "),a("v-snackbar",{attrs:{bottom:"",color:t.snackbar.color},model:{value:t.snackbar.show,callback:function(e){t.$set(t.snackbar,"show",e)},expression:"snackbar.show"}},[t._v(t._s(t.snackbar.message))])],1)},staticRenderFns:[]};var m=a("C7Lr")(o,i,!1,function(t){a("NOO7")},null,null);e.default=m.exports}}); 2 | //# sourceMappingURL=10.1848fe390d228d243769.js.map -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/CordovaInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import android.app.Activity; 22 | import android.content.Context; 23 | import android.content.Intent; 24 | 25 | import org.apache.cordova.CordovaPlugin; 26 | 27 | import java.util.concurrent.ExecutorService; 28 | 29 | /** 30 | * The Activity interface that is implemented by CordovaActivity. 31 | * It is used to isolate plugin development, and remove dependency on entire Cordova library. 32 | */ 33 | public interface CordovaInterface { 34 | 35 | /** 36 | * Launch an activity for which you would like a result when it finished. When this activity exits, 37 | * your onActivityResult() method will be called. 38 | * 39 | * @param command The command object 40 | * @param intent The intent to start 41 | * @param requestCode The request code that is passed to callback to identify the activity 42 | */ 43 | abstract public void startActivityForResult(CordovaPlugin command, Intent intent, int requestCode); 44 | 45 | /** 46 | * Set the plugin to be called when a sub-activity exits. 47 | * 48 | * @param plugin The plugin on which onActivityResult is to be called 49 | */ 50 | abstract public void setActivityResultCallback(CordovaPlugin plugin); 51 | 52 | /** 53 | * Get the Android activity. 54 | * 55 | * If a custom engine lives outside of the Activity's lifecycle the return value may be null. 56 | * 57 | * @return the Activity 58 | */ 59 | public abstract Activity getActivity(); 60 | 61 | /** 62 | * Get the Android context. 63 | * 64 | * @return the Context 65 | */ 66 | public Context getContext(); 67 | 68 | /** 69 | * Called when a message is sent to plugin. 70 | * 71 | * @param id The message id 72 | * @param data The message data 73 | * @return Object or null 74 | */ 75 | public Object onMessage(String id, Object data); 76 | 77 | /** 78 | * Returns a shared thread pool that can be used for background tasks. 79 | */ 80 | public ExecutorService getThreadPool(); 81 | 82 | /** 83 | * Sends a permission request to the activity for one permission. 84 | */ 85 | public void requestPermission(CordovaPlugin plugin, int requestCode, String permission); 86 | 87 | /** 88 | * Sends a permission request to the activity for a group of permissions 89 | */ 90 | public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions); 91 | 92 | /** 93 | * Check for a permission. Returns true if the permission is granted, false otherwise. 94 | */ 95 | public boolean hasPermission(String permission); 96 | 97 | } 98 | -------------------------------------------------------------------------------- /app/src/main/assets/www/static/js/12.0ac2a7d0a1d127eaee80.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([12],{OGD4:function(t,e){},"m+0q":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=s("IHPB"),r=s.n(a),o=s("RzMJ"),n=s("wst3"),i=s("0T5Q"),l={name:"historyPosts",components:{MescrollVue:n.a},data:function(){return{historyPosts:[],snackbar:{show:!1,message:"",color:"grey-darken3"},map:o.a,mescrollDown:{callback:this.refreshData,use:!0},mescrollUp:{callback:this.getMoreData,noMoreSize:3,empty:{warpId:"noMoreDataWrap",icon:null,tip:"暂无历史发帖",btntext:"",btnClick:null,supportTap:!1}}}},created:function(){},methods:{timeFormat:function(t){var e=Math.floor(((new Date).getTime()-new Date(t).getTime())/1e3),s=Math.floor(e/3600/24),a=Math.floor(e/3600)%24,r=Math.floor(e/60)%60,o=Math.floor(e%60),n="";if(o>0&&0==r&&0==a&&0==s)n=o+"秒前";else if(r>0&&0==a&&0==s)n=r+"分钟前";else{if(!(a>0&&0==s))return new Date(new Date(t).getTime()+288e5).toJSON().substr(0,16).replace("T"," ");n=a+"小时前"}return n},refreshData:function(t){var e=this;e.$request("get","/forum/getHistoryPosts",{timeToken:(new Date).getTime()},{}).then(function(s){e.historyPosts=s.data,t.endSuccess(s.data.length)}).catch(function(e){t.endErr()})},getMoreData:function(t,e){var s=this,a=s.historyPosts.length>0?new Date(s.historyPosts[s.historyPosts.length-1].created_time).getTime():(new Date).getTime();s.$request("get","/forum/getHistoryPosts",{timeToken:a}).then(function(a){var o;1===t.num&&(s.historyPosts=[]),console.log(a.data),(o=s.historyPosts).push.apply(o,r()(a.data)),e.endSuccess(a.data.length)}).catch(function(t){e.endErr()})},rightSlide:function(){this.$router.go(-1)}},directives:{touch:i.a}},c={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("v-container",{staticClass:"d-flex flex-column px-0"},[s("v-app-bar",{staticClass:"top",attrs:{fixed:"",app:"",color:"white"}},[s("v-btn",{staticClass:"mt-2",attrs:{fab:"",text:"",small:""},on:{click:function(e){return t.$router.back(-1)}}},[s("v-icon",{attrs:{large:""}},[t._v("mdi-arrow-left")])],1),t._v(" "),s("span",{staticClass:"text_middle mt-2"},[t._v("历史发帖")])],1),t._v(" "),s("div",{directives:[{name:"touch",rawName:"v-touch:swiperight",value:t.rightSlide,expression:"rightSlide",arg:"swiperight"}],ref:"viewBox",staticClass:"mescroll_container_historyPosts"},[s("mescroll-vue",{ref:"mescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp}},[s("div",{attrs:{id:"noMoreDataWrap"}}),t._v(" "),t._l(t.historyPosts,function(e,a){return s("v-card",{key:a,staticClass:"mt-2",attrs:{color:"white",width:"100%",flat:"",rounded:""},on:{click:function(s){return t.$router.push({path:"/postDetail",query:{id:e.id}})}}},[s("v-card-text",{staticClass:"d-flex flex-column pt-2 pb-4"},[s("div",{staticClass:"d-flex"},[s("v-avatar",{staticClass:"ml-3 mb-1",attrs:{size:"40"}},[s("img",{attrs:{src:e.avatar,alt:"头像"}})]),t._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("span",{staticClass:"text_small-- text_thick ml-2"},[t._v("#"+t._s(e.name))]),t._v(" "),s("span",{staticClass:"text_small--- ml-2 grey--text mt-n1"},[t._v(t._s(t.timeFormat(e.created_time)))])])],1),t._v(" "),s("span",{staticClass:"text_small-- black--text"},[s("span",{staticClass:"text_thick"},[t._v("【帖子】 "+t._s(e.title))])]),t._v(" "),s("div",{staticClass:"grey_background_historyPosts pa-1"},[s("span",{staticClass:"text_thick"},[t._v("【内容】:")]),t._v(" "),s("span",{staticClass:"black--text"},[t._v(t._s(e.content))])])])],1)})],2)],1),t._v(" "),s("v-snackbar",{attrs:{bottom:"",color:t.snackbar.color},model:{value:t.snackbar.show,callback:function(e){t.$set(t.snackbar,"show",e)},expression:"snackbar.show"}},[t._v(t._s(t.snackbar.message))])],1)},staticRenderFns:[]};var u=s("C7Lr")(l,c,!1,function(t){s("OGD4")},null,null);e.default=u.exports}}); 2 | //# sourceMappingURL=12.0ac2a7d0a1d127eaee80.js.map -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/CordovaArgs.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import org.json.JSONArray; 22 | import org.json.JSONException; 23 | import org.json.JSONObject; 24 | 25 | import android.util.Base64; 26 | 27 | public class CordovaArgs { 28 | private JSONArray baseArgs; 29 | 30 | public CordovaArgs(JSONArray args) { 31 | this.baseArgs = args; 32 | } 33 | 34 | 35 | // Pass through the basics to the base args. 36 | public Object get(int index) throws JSONException { 37 | return baseArgs.get(index); 38 | } 39 | 40 | public boolean getBoolean(int index) throws JSONException { 41 | return baseArgs.getBoolean(index); 42 | } 43 | 44 | public double getDouble(int index) throws JSONException { 45 | return baseArgs.getDouble(index); 46 | } 47 | 48 | public int getInt(int index) throws JSONException { 49 | return baseArgs.getInt(index); 50 | } 51 | 52 | public JSONArray getJSONArray(int index) throws JSONException { 53 | return baseArgs.getJSONArray(index); 54 | } 55 | 56 | public JSONObject getJSONObject(int index) throws JSONException { 57 | return baseArgs.getJSONObject(index); 58 | } 59 | 60 | public long getLong(int index) throws JSONException { 61 | return baseArgs.getLong(index); 62 | } 63 | 64 | public String getString(int index) throws JSONException { 65 | return baseArgs.getString(index); 66 | } 67 | 68 | 69 | public Object opt(int index) { 70 | return baseArgs.opt(index); 71 | } 72 | 73 | public boolean optBoolean(int index) { 74 | return baseArgs.optBoolean(index); 75 | } 76 | 77 | public double optDouble(int index) { 78 | return baseArgs.optDouble(index); 79 | } 80 | 81 | public int optInt(int index) { 82 | return baseArgs.optInt(index); 83 | } 84 | 85 | public JSONArray optJSONArray(int index) { 86 | return baseArgs.optJSONArray(index); 87 | } 88 | 89 | public JSONObject optJSONObject(int index) { 90 | return baseArgs.optJSONObject(index); 91 | } 92 | 93 | public long optLong(int index) { 94 | return baseArgs.optLong(index); 95 | } 96 | 97 | public String optString(int index) { 98 | return baseArgs.optString(index); 99 | } 100 | 101 | public boolean isNull(int index) { 102 | return baseArgs.isNull(index); 103 | } 104 | 105 | 106 | // The interesting custom helpers. 107 | public byte[] getArrayBuffer(int index) throws JSONException { 108 | String encoded = baseArgs.getString(index); 109 | return Base64.decode(encoded, Base64.DEFAULT); 110 | } 111 | } 112 | 113 | 114 | -------------------------------------------------------------------------------- /platform_www/plugins/cordova-plugin-statusbar/www/statusbar.js: -------------------------------------------------------------------------------- 1 | cordova.define("cordova-plugin-statusbar.statusbar", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | 23 | /* global cordova */ 24 | 25 | var exec = require('cordova/exec'); 26 | 27 | var namedColors = { 28 | "black": "#000000", 29 | "darkGray": "#A9A9A9", 30 | "lightGray": "#D3D3D3", 31 | "white": "#FFFFFF", 32 | "gray": "#808080", 33 | "red": "#FF0000", 34 | "green": "#00FF00", 35 | "blue": "#0000FF", 36 | "cyan": "#00FFFF", 37 | "yellow": "#FFFF00", 38 | "magenta": "#FF00FF", 39 | "orange": "#FFA500", 40 | "purple": "#800080", 41 | "brown": "#A52A2A" 42 | }; 43 | 44 | var StatusBar = { 45 | 46 | isVisible: true, 47 | 48 | overlaysWebView: function (doOverlay) { 49 | exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]); 50 | }, 51 | 52 | styleDefault: function () { 53 | // dark text ( to be used on a light background ) 54 | exec(null, null, "StatusBar", "styleDefault", []); 55 | }, 56 | 57 | styleLightContent: function () { 58 | // light text ( to be used on a dark background ) 59 | exec(null, null, "StatusBar", "styleLightContent", []); 60 | }, 61 | 62 | styleBlackTranslucent: function () { 63 | // #88000000 ? Apple says to use lightContent instead 64 | exec(null, null, "StatusBar", "styleBlackTranslucent", []); 65 | }, 66 | 67 | styleBlackOpaque: function () { 68 | // #FF000000 ? Apple says to use lightContent instead 69 | exec(null, null, "StatusBar", "styleBlackOpaque", []); 70 | }, 71 | 72 | backgroundColorByName: function (colorname) { 73 | return StatusBar.backgroundColorByHexString(namedColors[colorname]); 74 | }, 75 | 76 | backgroundColorByHexString: function (hexString) { 77 | if (hexString.charAt(0) !== "#") { 78 | hexString = "#" + hexString; 79 | } 80 | 81 | if (hexString.length === 4) { 82 | var split = hexString.split(""); 83 | hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3]; 84 | } 85 | 86 | exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]); 87 | }, 88 | 89 | hide: function () { 90 | exec(null, null, "StatusBar", "hide", []); 91 | StatusBar.isVisible = false; 92 | }, 93 | 94 | show: function () { 95 | exec(null, null, "StatusBar", "show", []); 96 | StatusBar.isVisible = true; 97 | } 98 | 99 | }; 100 | 101 | // prime it. setTimeout so that proxy gets time to init 102 | window.setTimeout(function () { 103 | exec(function (res) { 104 | if (typeof res == 'object') { 105 | if (res.type == 'tap') { 106 | cordova.fireWindowEvent('statusTap'); 107 | } 108 | } else { 109 | StatusBar.isVisible = res; 110 | } 111 | }, null, "StatusBar", "_ready", []); 112 | }, 0); 113 | 114 | module.exports = StatusBar; 115 | 116 | }); 117 | -------------------------------------------------------------------------------- /app/src/main/assets/www/plugins/cordova-plugin-statusbar/www/statusbar.js: -------------------------------------------------------------------------------- 1 | cordova.define("cordova-plugin-statusbar.statusbar", function(require, exports, module) { 2 | /* 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | * 21 | */ 22 | 23 | /* global cordova */ 24 | 25 | var exec = require('cordova/exec'); 26 | 27 | var namedColors = { 28 | "black": "#000000", 29 | "darkGray": "#A9A9A9", 30 | "lightGray": "#D3D3D3", 31 | "white": "#FFFFFF", 32 | "gray": "#808080", 33 | "red": "#FF0000", 34 | "green": "#00FF00", 35 | "blue": "#0000FF", 36 | "cyan": "#00FFFF", 37 | "yellow": "#FFFF00", 38 | "magenta": "#FF00FF", 39 | "orange": "#FFA500", 40 | "purple": "#800080", 41 | "brown": "#A52A2A" 42 | }; 43 | 44 | var StatusBar = { 45 | 46 | isVisible: true, 47 | 48 | overlaysWebView: function (doOverlay) { 49 | exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]); 50 | }, 51 | 52 | styleDefault: function () { 53 | // dark text ( to be used on a light background ) 54 | exec(null, null, "StatusBar", "styleDefault", []); 55 | }, 56 | 57 | styleLightContent: function () { 58 | // light text ( to be used on a dark background ) 59 | exec(null, null, "StatusBar", "styleLightContent", []); 60 | }, 61 | 62 | styleBlackTranslucent: function () { 63 | // #88000000 ? Apple says to use lightContent instead 64 | exec(null, null, "StatusBar", "styleBlackTranslucent", []); 65 | }, 66 | 67 | styleBlackOpaque: function () { 68 | // #FF000000 ? Apple says to use lightContent instead 69 | exec(null, null, "StatusBar", "styleBlackOpaque", []); 70 | }, 71 | 72 | backgroundColorByName: function (colorname) { 73 | return StatusBar.backgroundColorByHexString(namedColors[colorname]); 74 | }, 75 | 76 | backgroundColorByHexString: function (hexString) { 77 | if (hexString.charAt(0) !== "#") { 78 | hexString = "#" + hexString; 79 | } 80 | 81 | if (hexString.length === 4) { 82 | var split = hexString.split(""); 83 | hexString = "#" + split[1] + split[1] + split[2] + split[2] + split[3] + split[3]; 84 | } 85 | 86 | exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]); 87 | }, 88 | 89 | hide: function () { 90 | exec(null, null, "StatusBar", "hide", []); 91 | StatusBar.isVisible = false; 92 | }, 93 | 94 | show: function () { 95 | exec(null, null, "StatusBar", "show", []); 96 | StatusBar.isVisible = true; 97 | } 98 | 99 | }; 100 | 101 | // prime it. setTimeout so that proxy gets time to init 102 | window.setTimeout(function () { 103 | exec(function (res) { 104 | if (typeof res == 'object') { 105 | if (res.type == 'tap') { 106 | cordova.fireWindowEvent('statusTap'); 107 | } 108 | } else { 109 | StatusBar.isVisible = res; 110 | } 111 | }, null, "StatusBar", "_ready", []); 112 | }, 0); 113 | 114 | module.exports = StatusBar; 115 | 116 | }); 117 | -------------------------------------------------------------------------------- /cordova/lib/android_sdk.js: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | const execa = require('execa'); 21 | 22 | var suffix_number_regex = /(\d+)$/; 23 | // Used for sorting Android targets, example strings to sort: 24 | // android-19 25 | // android-L 26 | // Google Inc.:Google APIs:20 27 | // Google Inc.:Glass Development Kit Preview:20 28 | // The idea is to sort based on largest "suffix" number - meaning the bigger 29 | // the number at the end, the more recent the target, the closer to the 30 | // start of the array. 31 | function sort_by_largest_numerical_suffix (a, b) { 32 | let suffix_a = a.match(suffix_number_regex); 33 | let suffix_b = b.match(suffix_number_regex); 34 | // If no number is detected (eg: preview version like android-R), 35 | // designate a suffix of 0 so it gets moved to the end 36 | suffix_a = suffix_a || ['0', '0']; 37 | suffix_b = suffix_b || ['0', '0']; 38 | // Return < zero, or > zero, based on which suffix is larger. 39 | return (parseInt(suffix_a[1]) > parseInt(suffix_b[1]) ? -1 : 1); 40 | } 41 | 42 | module.exports.print_newest_available_sdk_target = function () { 43 | return module.exports.list_targets().then(function (targets) { 44 | targets.sort(sort_by_largest_numerical_suffix); 45 | console.log(targets[0]); 46 | }); 47 | }; 48 | 49 | // Versions should not be represented as float, so we disable quote-props here 50 | /* eslint-disable quote-props */ 51 | module.exports.version_string_to_api_level = { 52 | '4.0': 14, 53 | '4.0.3': 15, 54 | '4.1': 16, 55 | '4.2': 17, 56 | '4.3': 18, 57 | '4.4': 19, 58 | '4.4W': 20, 59 | '5.0': 21, 60 | '5.1': 22, 61 | '6.0': 23, 62 | '7.0': 24, 63 | '7.1.1': 25, 64 | '8.0': 26 65 | }; 66 | /* eslint-enable quote-props */ 67 | 68 | function parse_targets (output) { 69 | var target_out = output.split('\n'); 70 | var targets = []; 71 | for (var i = target_out.length - 1; i >= 0; i--) { 72 | if (target_out[i].match(/id:/)) { // if "id:" is in the line... 73 | targets.push(target_out[i].match(/"(.+)"/)[1]); // .. match whatever is in quotes. 74 | } 75 | } 76 | return targets; 77 | } 78 | 79 | module.exports.list_targets_with_android = function () { 80 | return execa('android', ['list', 'target']).then(result => parse_targets(result.stdout)); 81 | }; 82 | 83 | module.exports.list_targets_with_avdmanager = function () { 84 | return execa('avdmanager', ['list', 'target']).then(result => parse_targets(result.stdout)); 85 | }; 86 | 87 | module.exports.list_targets = function () { 88 | return module.exports.list_targets_with_avdmanager().catch(function (err) { 89 | // If there's an error, like avdmanager could not be found, we can try 90 | // as a last resort, to run `android`, in case this is a super old 91 | // SDK installation. 92 | if (err && (err.code === 'ENOENT' || (err.stderr && err.stderr.match(/not recognized/)))) { 93 | return module.exports.list_targets_with_android(); 94 | } else throw err; 95 | }).then(function (targets) { 96 | if (targets.length === 0) { 97 | return Promise.reject(new Error('No android targets (SDKs) installed!')); 98 | } 99 | return targets; 100 | }); 101 | }; 102 | -------------------------------------------------------------------------------- /CordovaLib/src/org/apache/cordova/PermissionHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova; 20 | 21 | import java.util.Arrays; 22 | 23 | import org.json.JSONException; 24 | 25 | import android.content.pm.PackageManager; 26 | 27 | /** 28 | * This class provides reflective methods for permission requesting and checking so that plugins 29 | * written for cordova-android 5.0.0+ can still compile with earlier cordova-android versions. 30 | */ 31 | public class PermissionHelper { 32 | private static final String LOG_TAG = "CordovaPermissionHelper"; 33 | 34 | /** 35 | * Requests a "dangerous" permission for the application at runtime. This is a helper method 36 | * alternative to cordovaInterface.requestPermission() that does not require the project to be 37 | * built with cordova-android 5.0.0+ 38 | * 39 | * @param plugin The plugin the permission is being requested for 40 | * @param requestCode A requestCode to be passed to the plugin's onRequestPermissionResult() 41 | * along with the result of the permission request 42 | * @param permission The permission to be requested 43 | */ 44 | public static void requestPermission(CordovaPlugin plugin, int requestCode, String permission) { 45 | PermissionHelper.requestPermissions(plugin, requestCode, new String[] {permission}); 46 | } 47 | 48 | /** 49 | * Requests "dangerous" permissions for the application at runtime. This is a helper method 50 | * alternative to cordovaInterface.requestPermissions() that does not require the project to be 51 | * built with cordova-android 5.0.0+ 52 | * 53 | * @param plugin The plugin the permissions are being requested for 54 | * @param requestCode A requestCode to be passed to the plugin's onRequestPermissionResult() 55 | * along with the result of the permissions request 56 | * @param permissions The permissions to be requested 57 | */ 58 | public static void requestPermissions(CordovaPlugin plugin, int requestCode, String[] permissions) { 59 | plugin.cordova.requestPermissions(plugin, requestCode, permissions); 60 | } 61 | 62 | /** 63 | * Checks at runtime to see if the application has been granted a permission. This is a helper 64 | * method alternative to cordovaInterface.hasPermission() that does not require the project to 65 | * be built with cordova-android 5.0.0+ 66 | * 67 | * @param plugin The plugin the permission is being checked against 68 | * @param permission The permission to be checked 69 | * 70 | * @return True if the permission has already been granted and false otherwise 71 | */ 72 | public static boolean hasPermission(CordovaPlugin plugin, String permission) { 73 | return plugin.cordova.hasPermission(permission); 74 | } 75 | 76 | private static void deliverPermissionResult(CordovaPlugin plugin, int requestCode, String[] permissions) { 77 | // Generate the request results 78 | int[] requestResults = new int[permissions.length]; 79 | Arrays.fill(requestResults, PackageManager.PERMISSION_GRANTED); 80 | 81 | try { 82 | plugin.onRequestPermissionResult(requestCode, permissions, requestResults); 83 | } catch (JSONException e) { 84 | LOG.e(LOG_TAG, "JSONException when delivering permissions results", e); 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /app/src/main/assets/www/static/js/7.6064a107def14db70103.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([7],{IBsw:function(t,e,o){t.exports=o.p+"static/img/2.44fac64.png"},J3t0:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o("lC5x"),s=o.n(n),a=o("J0Oq"),r=o.n(a),i=o("rVsN"),c=o.n(i),u=o("Tf9m"),m=o.n(u);o("CtzY");function p(t){var e=[" 〇 ","一","二","三","四","五","六","七","八","九"],o=[],n=t.getMonth()+1;n<10?o.push(e[n]):n<20&&o.push("十"+e[n%10]),o.push("月");var s=t.getDate();return s<10?o.push(e[s]):s<20?o.push("十"+e[s%10]):o.push("二十"+e[s%10]),o.push("日"),o.join("")}var l={name:"welcome",data:function(){return{motto:{hitokoto:"",from:"",day:""}}},created:function(){var t=this;return r()(s.a.mark(function e(){var o,n;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.day=p(new Date),o=t,document.addEventListener("deviceready",function(){cordova.getAppVersion.getVersionNumber().then(function(t){o.$request("get","/user/getAppConfig",{},{}).then(function(e){sessionStorage.setItem("remoteVersion",e.data.version),sessionStorage.setItem("o",e.data.o-(new Date).getTime()),sessionStorage.setItem("hotExplainContent",e.data.hotExplainContent),sessionStorage.setItem("processExplainContent",e.data.processExplainContent),sessionStorage.setItem("shieldExplainContent",e.data.shieldExplainContent),sessionStorage.setItem("shieldCommentExContent",e.data.shieldCommentExContent),e.data.version==t?sessionStorage.setItem("version",t):(o.showSnackbar("您的软件不是最新版,请前往下载最新版app"),setTimeout(function(){window.open("http://scuhuoguodiliao.com","_system",{})},1200))}).catch(function(t){o.showSnackbar(t),setTimeout(function(){navigator.app.exitApp()},1e3)})})}),setTimeout(function(){var e;sessionStorage.getItem("remoteVersion")&&sessionStorage.getItem("remoteVersion")!=sessionStorage.getItem("version")?(o.showSnackbar("您的软件不是最新版,请前往下载最新版app"),setTimeout(function(){window.open("http://scuhuoguodiliao.com","_system",{})},1200)):sessionStorage.getItem("version")?localStorage.getItem("token")&&"/"==t.$route.path?o.$request("post","/user/login",{},{token:localStorage.getItem("token")}).then((e=r()(s.a.mark(function e(n){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.$router.replace("/main/index");case 1:case"end":return t.stop()}},e,t)})),function(t){return e.apply(this,arguments)})).catch(function(t){o.$router.replace("/login")}):"/"==t.$route.path&&o.$router.replace("/login"):t.showSnackbar("app还未加载完成")},6e3),e.next=6,new c.a(function(t,e){m()({method:"get",url:"https://v1.hitokoto.cn/?c=h&c=d&c=i&c=a&encode=json&min_length=6&max_length=50"}).then(function(e){t(e.data)})});case 6:n=e.sent,t.motto.hitokoto=n.hitokoto,t.motto.from=n.from,console.log(t.motto);case 10:case"end":return e.stop()}},e,t)}))()},methods:{change:function(){var t,e=this,o=this;sessionStorage.getItem("remoteVersion")&&sessionStorage.getItem("remoteVersion")!=sessionStorage.getItem("version")?(o.showSnackbar("您的软件不是最新版,请前往下载最新版app"),setTimeout(function(){window.open("http://scuhuoguodiliao.com","_system",{})},1200)):sessionStorage.getItem("version")&&sessionStorage.getItem("remoteVersion")?localStorage.getItem("token")?o.$request("post","/user/login",{},{token:localStorage.getItem("token")}).then((t=r()(s.a.mark(function t(n){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.$router.replace("/main/index");case 1:case"end":return t.stop()}},t,e)})),function(e){return t.apply(this,arguments)})).catch(function(t){o.$router.replace("/login")}):this.$router.replace("/login"):this.showSnackbar("app还未加载完成")}}},h={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-container",{staticClass:"d-flex justify-center flex-column align-start",attrs:{"fill-height":""},on:{click:t.change}},[n("span",{staticClass:"text_xxxlarge d-flex welcome_title mt-n16",staticStyle:{"font-family":"'simfang'"}},[n("span",{staticClass:"text_thick mt-n2 text_xxxxlarge red--text"},[t._v("火")]),t._v(" "),n("span",[t._v("锅底料")])]),t._v(" "),n("span",{staticClass:"ml-5 grey--text"},[t._v(t._s(t.day))]),t._v(" "),n("div",{staticStyle:{width:"100%",height:"300px"}},[n("v-img",{staticClass:"mx-auto mt-3",attrs:{src:o("IBsw"),width:"240px",height:"240px",contain:""}})],1),t._v(" "),n("span",{staticClass:"mx-auto text_thick hitokoto d-flex justify-center"},[n("span",[t._v("『"+t._s(t.motto.hitokoto)+"』")])]),t._v(" "),n("span",{staticClass:"mx-auto"},[t._v("———《"+t._s(t.motto.from)+"》")])])},staticRenderFns:[]};var g=o("C7Lr")(l,h,!1,function(t){o("gtKR")},null,null);e.default=g.exports},gtKR:function(t,e){}}); 2 | //# sourceMappingURL=7.6064a107def14db70103.js.map -------------------------------------------------------------------------------- /platform_www/cordova-js-src/plugin/android/app.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | var exec = require('cordova/exec'); 23 | var APP_PLUGIN_NAME = Number(require('cordova').platformVersion.split('.')[0]) >= 4 ? 'CoreAndroid' : 'App'; 24 | 25 | module.exports = { 26 | /** 27 | * Clear the resource cache. 28 | */ 29 | clearCache: function () { 30 | exec(null, null, APP_PLUGIN_NAME, 'clearCache', []); 31 | }, 32 | 33 | /** 34 | * Load the url into the webview or into new browser instance. 35 | * 36 | * @param url The URL to load 37 | * @param props Properties that can be passed in to the activity: 38 | * wait: int => wait msec before loading URL 39 | * loadingDialog: "Title,Message" => display a native loading dialog 40 | * loadUrlTimeoutValue: int => time in msec to wait before triggering a timeout error 41 | * clearHistory: boolean => clear webview history (default=false) 42 | * openExternal: boolean => open in a new browser (default=false) 43 | * 44 | * Example: 45 | * navigator.app.loadUrl("http://server/myapp/index.html", {wait:2000, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000}); 46 | */ 47 | loadUrl: function (url, props) { 48 | exec(null, null, APP_PLUGIN_NAME, 'loadUrl', [url, props]); 49 | }, 50 | 51 | /** 52 | * Cancel loadUrl that is waiting to be loaded. 53 | */ 54 | cancelLoadUrl: function () { 55 | exec(null, null, APP_PLUGIN_NAME, 'cancelLoadUrl', []); 56 | }, 57 | 58 | /** 59 | * Clear web history in this web view. 60 | * Instead of BACK button loading the previous web page, it will exit the app. 61 | */ 62 | clearHistory: function () { 63 | exec(null, null, APP_PLUGIN_NAME, 'clearHistory', []); 64 | }, 65 | 66 | /** 67 | * Go to previous page displayed. 68 | * This is the same as pressing the backbutton on Android device. 69 | */ 70 | backHistory: function () { 71 | exec(null, null, APP_PLUGIN_NAME, 'backHistory', []); 72 | }, 73 | 74 | /** 75 | * Override the default behavior of the Android back button. 76 | * If overridden, when the back button is pressed, the "backKeyDown" JavaScript event will be fired. 77 | * 78 | * Note: The user should not have to call this method. Instead, when the user 79 | * registers for the "backbutton" event, this is automatically done. 80 | * 81 | * @param override T=override, F=cancel override 82 | */ 83 | overrideBackbutton: function (override) { 84 | exec(null, null, APP_PLUGIN_NAME, 'overrideBackbutton', [override]); 85 | }, 86 | 87 | /** 88 | * Override the default behavior of the Android volume button. 89 | * If overridden, when the volume button is pressed, the "volume[up|down]button" 90 | * JavaScript event will be fired. 91 | * 92 | * Note: The user should not have to call this method. Instead, when the user 93 | * registers for the "volume[up|down]button" event, this is automatically done. 94 | * 95 | * @param button volumeup, volumedown 96 | * @param override T=override, F=cancel override 97 | */ 98 | overrideButton: function (button, override) { 99 | exec(null, null, APP_PLUGIN_NAME, 'overrideButton', [button, override]); 100 | }, 101 | 102 | /** 103 | * Exit and terminate the application. 104 | */ 105 | exitApp: function () { 106 | return exec(null, null, APP_PLUGIN_NAME, 'exitApp', []); 107 | } 108 | }; 109 | --------------------------------------------------------------------------------