├── getting-started ├── TODO.md ├── jsconfig.json ├── temp.js ├── index.html ├── index-addingNodes.html └── index-layout.html ├── .eslintignore ├── electron_twitter ├── .gitignore ├── api_key.json.example ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── jsconfig.json ├── README.md ├── index.html ├── typings.json ├── css │ └── graph_style.css ├── package.json ├── ui.html └── main.js ├── cordovacy ├── platforms │ ├── platforms.json │ ├── android │ │ ├── .gradle │ │ │ └── 2.13 │ │ │ │ ├── taskArtifacts │ │ │ │ ├── cache.properties │ │ │ │ ├── fileHashes.bin │ │ │ │ ├── fileSnapshots.bin │ │ │ │ ├── taskArtifacts.bin │ │ │ │ └── cache.properties.lock │ │ │ │ └── tasks │ │ │ │ ├── _compileDebugJavaWithJavac │ │ │ │ ├── localClassSetAnalysis │ │ │ │ │ ├── localClassSetAnalysis.bin │ │ │ │ │ └── localClassSetAnalysis.lock │ │ │ │ └── localJarClasspathSnapshot │ │ │ │ │ ├── localJarClasspathSnapshot.bin │ │ │ │ │ └── localJarClasspathSnapshot.lock │ │ │ │ └── _CordovaLib_compileDebugJavaWithJavac │ │ │ │ ├── localClassSetAnalysis │ │ │ │ ├── localClassSetAnalysis.bin │ │ │ │ └── localClassSetAnalysis.lock │ │ │ │ └── localJarClasspathSnapshot │ │ │ │ ├── localJarClasspathSnapshot.bin │ │ │ │ └── localJarClasspathSnapshot.lock │ │ ├── CordovaLib │ │ │ ├── build │ │ │ │ ├── intermediates │ │ │ │ │ ├── incremental │ │ │ │ │ │ ├── compileDebugAidl │ │ │ │ │ │ │ └── dependency.store │ │ │ │ │ │ ├── mergeDebugShaders │ │ │ │ │ │ │ └── merger.xml │ │ │ │ │ │ ├── mergeDebugJniLibFolders │ │ │ │ │ │ │ └── merger.xml │ │ │ │ │ │ ├── mergeDebugAssets │ │ │ │ │ │ │ └── merger.xml │ │ │ │ │ │ └── packageDebugResources │ │ │ │ │ │ │ └── merger.xml │ │ │ │ │ ├── incremental-safeguard │ │ │ │ │ │ └── debug │ │ │ │ │ │ │ └── tag.txt │ │ │ │ │ └── bundles │ │ │ │ │ │ └── debug │ │ │ │ │ │ ├── classes.jar │ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ │ └── aapt │ │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ ├── outputs │ │ │ │ │ └── aar │ │ │ │ │ │ └── CordovaLib-debug.aar │ │ │ │ └── generated │ │ │ │ │ └── source │ │ │ │ │ └── buildConfig │ │ │ │ │ └── debug │ │ │ │ │ └── org │ │ │ │ │ └── apache │ │ │ │ │ └── cordova │ │ │ │ │ └── BuildConfig.java │ │ │ ├── project.properties │ │ │ ├── AndroidManifest.xml │ │ │ ├── src │ │ │ │ └── org │ │ │ │ │ └── apache │ │ │ │ │ └── cordova │ │ │ │ │ ├── ICordovaCookieManager.java │ │ │ │ │ ├── ExposedJsApi.java │ │ │ │ │ ├── ICordovaHttpAuthHandler.java │ │ │ │ │ ├── CordovaHttpAuthHandler.java │ │ │ │ │ ├── AuthenticationToken.java │ │ │ │ │ ├── engine │ │ │ │ │ ├── SystemExposedJsApi.java │ │ │ │ │ └── SystemCookieManager.java │ │ │ │ │ ├── ICordovaClientCertRequest.java │ │ │ │ │ ├── Config.java │ │ │ │ │ ├── PluginEntry.java │ │ │ │ │ └── CallbackMap.java │ │ │ └── build.gradle │ │ ├── settings.gradle │ │ ├── assets │ │ │ └── www │ │ │ │ ├── img │ │ │ │ └── logo.png │ │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ ├── cordova_plugins.js │ │ │ │ ├── cordova-js-src │ │ │ │ └── android │ │ │ │ │ ├── nativeapiprovider.js │ │ │ │ │ └── promptbasednativeapi.js │ │ │ │ ├── css │ │ │ │ └── index.css │ │ │ │ └── js │ │ │ │ └── index.js │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-ldpi │ │ │ │ └── icon.png │ │ │ ├── drawable-mdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-xhdpi │ │ │ │ └── icon.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 │ │ │ ├── values │ │ │ │ └── strings.xml │ │ │ └── xml │ │ │ │ └── config.xml │ │ ├── cordova │ │ │ ├── .jshintrc │ │ │ ├── loggingHelper.js │ │ │ ├── log.bat │ │ │ ├── run.bat │ │ │ ├── build.bat │ │ │ ├── clean.bat │ │ │ ├── version.bat │ │ │ ├── check_reqs.bat │ │ │ ├── version │ │ │ ├── defaults.xml │ │ │ ├── lib │ │ │ │ ├── list-devices.bat │ │ │ │ ├── install-device.bat │ │ │ │ ├── start-emulator.bat │ │ │ │ ├── install-emulator.bat │ │ │ │ ├── list-emulator-images.bat │ │ │ │ ├── list-started-emulators.bat │ │ │ │ ├── list-devices │ │ │ │ ├── list-started-emulators │ │ │ │ ├── list-emulator-images │ │ │ │ ├── install-emulator │ │ │ │ ├── start-emulator │ │ │ │ ├── install-device │ │ │ │ ├── builders │ │ │ │ │ └── builders.js │ │ │ │ ├── log.js │ │ │ │ ├── android_sdk_version.js │ │ │ │ ├── retry.js │ │ │ │ └── plugin-build.gradle │ │ │ ├── android_sdk_version │ │ │ ├── check_reqs │ │ │ ├── log │ │ │ ├── build │ │ │ ├── clean │ │ │ └── run │ │ ├── .gitignore │ │ ├── platform_www │ │ │ ├── cordova_plugins.js │ │ │ └── cordova-js-src │ │ │ │ └── android │ │ │ │ ├── nativeapiprovider.js │ │ │ │ └── promptbasednativeapi.js │ │ ├── project.properties │ │ ├── android.json │ │ ├── AndroidManifest.xml │ │ └── src │ │ │ └── com │ │ │ └── josephstahl │ │ │ └── cordovacy │ │ │ └── MainActivity.java │ └── browser │ │ ├── img │ │ └── logo.png │ │ ├── build │ │ └── package.zip │ │ ├── www │ │ ├── img │ │ │ └── logo.png │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── cordova_plugins.js │ │ ├── config.xml │ │ ├── css │ │ │ └── index.css │ │ ├── platform.js │ │ ├── cordova-js-src │ │ │ └── platform.js │ │ └── js │ │ │ └── index.js │ │ ├── res │ │ └── icon │ │ │ ├── ios │ │ │ ├── icon-57.png │ │ │ ├── icon-72.png │ │ │ ├── icon-57-2x.png │ │ │ └── icon-72-2x.png │ │ │ ├── bada │ │ │ └── icon-128.png │ │ │ ├── tizen │ │ │ └── icon-128.png │ │ │ ├── webos │ │ │ └── icon-64.png │ │ │ ├── blackberry │ │ │ └── icon-80.png │ │ │ ├── android │ │ │ ├── icon-36-ldpi.png │ │ │ ├── icon-48-mdpi.png │ │ │ ├── icon-72-hdpi.png │ │ │ └── icon-96-xhdpi.png │ │ │ ├── blackberry10 │ │ │ └── icon-80.png │ │ │ ├── windows-phone │ │ │ ├── icon-48.png │ │ │ ├── icon-62-tile.png │ │ │ └── icon-173-tile.png │ │ │ └── bada-wac │ │ │ ├── icon-48-type5.png │ │ │ ├── icon-50-type3.png │ │ │ └── icon-80-type4.png │ │ ├── manifest.webapp │ │ ├── platform_www │ │ ├── cordova_plugins.js │ │ ├── platform.js │ │ └── cordova-js-src │ │ │ └── platform.js │ │ ├── browser.json │ │ ├── config.xml │ │ ├── cordova │ │ ├── lib │ │ │ ├── check_reqs.js │ │ │ ├── clean.js │ │ │ └── build.js │ │ ├── version │ │ ├── run.bat │ │ ├── build.bat │ │ ├── version.bat │ │ ├── defaults.xml │ │ ├── build │ │ ├── clean │ │ └── run │ │ ├── index.html │ │ └── js │ │ └── index.js ├── TODO.md ├── WWW │ ├── img │ │ └── logo.png │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── css │ │ └── index.css │ └── js │ │ └── index.js ├── typings.json ├── plugins │ ├── cordova-plugin-whitelist │ │ ├── NOTICE │ │ ├── package.json │ │ ├── CONTRIBUTING.md │ │ └── plugin.xml │ ├── fetch.json │ ├── android.json │ └── browser.json ├── jsconfig.json ├── package.json ├── README.md ├── bower.json ├── .gitignore ├── hooks │ └── Readme.md └── config.xml ├── twitterAPI_express ├── views │ ├── index.jade │ ├── error.jade │ └── layout.jade ├── public │ └── stylesheets │ │ └── style.css ├── routes │ └── index.js ├── README.md ├── jsconfig.json ├── typings.json ├── package.json ├── app.js └── bin │ └── www ├── .jsbeautifyrc ├── glycolysis ├── assets │ ├── assets.zip │ ├── finished_graph.png │ ├── source.txt │ └── graph_before_button.png ├── TODO.md ├── jsconfig.json └── index.html ├── .vscode ├── settings.json └── tasks.json ├── twitter_graph ├── screenshots │ ├── qtip.png │ └── finished.png ├── typings.json ├── README.md ├── jsconfig.json ├── package.json ├── TODO.md └── index.html ├── learning-electron ├── typings.json ├── renderer.js ├── jsconfig.json ├── package.json ├── cy_graph.js ├── index.html └── main.js ├── README.md ├── .eslintrc.js ├── package.json └── .gitignore /getting-started/TODO.md: -------------------------------------------------------------------------------- 1 | - Done (currently) -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | cytoscape.js 2 | cytoscape.min.js 3 | */assets/ -------------------------------------------------------------------------------- /electron_twitter/.gitignore: -------------------------------------------------------------------------------- 1 | cache/* 2 | api_key.json 3 | out/ -------------------------------------------------------------------------------- /cordovacy/platforms/platforms.json: -------------------------------------------------------------------------------- 1 | { 2 | "android": "5.2.1", 3 | "browser": "4.1.0" 4 | } -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/taskArtifacts/cache.properties: -------------------------------------------------------------------------------- 1 | #Tue Aug 09 21:59:16 CDT 2016 2 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/incremental/compileDebugAidl/dependency.store: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /electron_twitter/api_key.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "key": "twitterAPIKeyHere", 3 | "secret": "twitterAPISecretHere" 4 | } -------------------------------------------------------------------------------- /cordovacy/TODO.md: -------------------------------------------------------------------------------- 1 | - TEST ON DEVICES! 2 | - Animate layout changes to transition is less jarring 3 | - Beautify code 4 | -------------------------------------------------------------------------------- /cordovacy/WWW/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/WWW/img/logo.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/incremental-safeguard/debug/tag.txt: -------------------------------------------------------------------------------- 1 | incremental task execution -------------------------------------------------------------------------------- /cordovacy/platforms/android/settings.gradle: -------------------------------------------------------------------------------- 1 | // GENERATED FILE - DO NOT EDIT 2 | include ":" 3 | include ":CordovaLib" 4 | -------------------------------------------------------------------------------- /twitterAPI_express/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /.jsbeautifyrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent_size": 2, 3 | "end_with_newline": true, 4 | "brace_style": "collapse-preserve-inline" 5 | } -------------------------------------------------------------------------------- /glycolysis/assets/assets.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/glycolysis/assets/assets.zip -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "editor.tabSize": 2 4 | } -------------------------------------------------------------------------------- /cordovacy/WWW/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/WWW/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /twitter_graph/screenshots/qtip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/twitter_graph/screenshots/qtip.png -------------------------------------------------------------------------------- /glycolysis/assets/finished_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/glycolysis/assets/finished_graph.png -------------------------------------------------------------------------------- /glycolysis/assets/source.txt: -------------------------------------------------------------------------------- 1 | By Thomas Shafee (Own work) [CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0)], via Wikimedia Commons -------------------------------------------------------------------------------- /twitterAPI_express/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/img/logo.png -------------------------------------------------------------------------------- /electron_twitter/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/electron_twitter/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /twitter_graph/screenshots/finished.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/twitter_graph/screenshots/finished.png -------------------------------------------------------------------------------- /glycolysis/assets/graph_before_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/glycolysis/assets/graph_before_button.png -------------------------------------------------------------------------------- /cordovacy/WWW/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/WWW/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /cordovacy/WWW/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/WWW/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /cordovacy/WWW/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/WWW/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /cordovacy/WWW/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/WWW/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /cordovacy/platforms/browser/build/package.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/build/package.zip -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/www/img/logo.png -------------------------------------------------------------------------------- /electron_twitter/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/electron_twitter/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /electron_twitter/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/electron_twitter/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /electron_twitter/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/electron_twitter/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /electron_twitter/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/electron_twitter/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/assets/www/img/logo.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/ios/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/ios/icon-57.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/ios/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/ios/icon-72.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/bada/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/bada/icon-128.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/ios/icon-57-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/ios/icon-57-2x.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/ios/icon-72-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/ios/icon-72-2x.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/tizen/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/tizen/icon-128.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/webos/icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/webos/icon-64.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/www/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/assets/www/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/blackberry/icon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/blackberry/icon-80.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-land-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-land-hdpi/screen.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-land-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-land-ldpi/screen.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-land-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-land-mdpi/screen.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-land-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-land-xhdpi/screen.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-port-hdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-port-hdpi/screen.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-port-ldpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-port-ldpi/screen.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-port-mdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-port-mdpi/screen.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/drawable-port-xhdpi/screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/res/drawable-port-xhdpi/screen.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/android/icon-36-ldpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/android/icon-36-ldpi.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/android/icon-48-mdpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/android/icon-48-mdpi.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/android/icon-72-hdpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/android/icon-72-hdpi.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/android/icon-96-xhdpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/android/icon-96-xhdpi.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/blackberry10/icon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/blackberry10/icon-80.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/windows-phone/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/windows-phone/icon-48.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/www/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/www/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/www/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /twitterAPI_express/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /twitterAPI_express/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/bada-wac/icon-48-type5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/bada-wac/icon-48-type5.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/bada-wac/icon-50-type3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/bada-wac/icon-50-type3.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/bada-wac/icon-80-type4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/bada-wac/icon-80-type4.png -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/www/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /cordovacy/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "globalDependencies": { 3 | "cordova": "registry:dt/cordova#0.0.0+20160607055823", 4 | "jquery": "registry:dt/jquery#1.10.0+20160704162008" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /twitter_graph/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twitter_graph", 3 | "dependencies": {}, 4 | "globalDependencies": { 5 | "jquery": "registry:dt/jquery#1.10.0+20160417213236" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/windows-phone/icon-62-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/windows-phone/icon-62-tile.png -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/taskArtifacts/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/taskArtifacts/fileHashes.bin -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/assets/www/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/assets/www/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/assets/www/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/assets/www/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /cordovacy/platforms/browser/res/icon/windows-phone/icon-173-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/browser/res/icon/windows-phone/icon-173-tile.png -------------------------------------------------------------------------------- /learning-electron/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "globalDevDependencies": { 3 | "electron": "registry:env/electron#0.37.6+20160416165306", 4 | "node": "registry:dt/node#6.0.0+20160621231320" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/taskArtifacts/fileSnapshots.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/taskArtifacts/fileSnapshots.bin -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/taskArtifacts/taskArtifacts.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/taskArtifacts/taskArtifacts.bin -------------------------------------------------------------------------------- /learning-electron/renderer.js: -------------------------------------------------------------------------------- 1 | // This file is required by the index.html file and will 2 | // be executed in the renderer process for that window. 3 | // All of the Node.js APIs are available in this process. 4 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/taskArtifacts/cache.properties.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/taskArtifacts/cache.properties.lock -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/outputs/aar/CordovaLib-debug.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/CordovaLib/build/outputs/aar/CordovaLib-debug.aar -------------------------------------------------------------------------------- /cordovacy/plugins/cordova-plugin-whitelist/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Cordova 2 | Copyright 2012 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/bundles/debug/classes.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/CordovaLib/build/intermediates/bundles/debug/classes.jar -------------------------------------------------------------------------------- /cordovacy/platforms/android/cordova/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true 3 | , "bitwise": true 4 | , "undef": true 5 | , "trailing": true 6 | , "quotmark": true 7 | , "indent": 4 8 | , "unused": "vars" 9 | , "latedef": "nofunc" 10 | } 11 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/.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 builds 14 | /build 15 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/manifest.webapp: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My App", 3 | "description": "Description of your app", 4 | "launch_path": "/index.html", 5 | "icons": { 6 | "128": "/img/logo.png" 7 | }, 8 | "default_locale": "en", 9 | "type": "privileged" 10 | } -------------------------------------------------------------------------------- /cordovacy/plugins/fetch.json: -------------------------------------------------------------------------------- 1 | { 2 | "cordova-plugin-whitelist": { 3 | "source": { 4 | "type": "registry", 5 | "id": "cordova-plugin-whitelist@1" 6 | }, 7 | "is_top_level": true, 8 | "variables": {} 9 | } 10 | } -------------------------------------------------------------------------------- /twitter_graph/README.md: -------------------------------------------------------------------------------- 1 | # Running 2 | 3 | ** Python 3 ** 4 | 5 | ``` 6 | python -m http.server 7 | ``` 8 | 9 | Relies on getting data from the Twitter API (see twitterAPI_express folder). 10 | Once data is downloaded, the Express API will cache it on disk to save later calls. -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = []; 3 | module.exports.metadata = 4 | // TOP OF METADATA 5 | { 6 | "cordova-plugin-whitelist": "1.2.2" 7 | } 8 | // BOTTOM OF METADATA 9 | }); -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = []; 3 | module.exports.metadata = 4 | // TOP OF METADATA 5 | { 6 | "cordova-plugin-whitelist": "1.2.2" 7 | }; 8 | // BOTTOM OF METADATA 9 | }); -------------------------------------------------------------------------------- /cordovacy/platforms/android/platform_www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = []; 3 | module.exports.metadata = 4 | // TOP OF METADATA 5 | { 6 | "cordova-plugin-whitelist": "1.2.2" 7 | }; 8 | // BOTTOM OF METADATA 9 | }); -------------------------------------------------------------------------------- /cordovacy/platforms/browser/platform_www/cordova_plugins.js: -------------------------------------------------------------------------------- 1 | cordova.define('cordova/plugin_list', function(require, exports, module) { 2 | module.exports = []; 3 | module.exports.metadata = 4 | // TOP OF METADATA 5 | { 6 | "cordova-plugin-whitelist": "1.2.2" 7 | } 8 | // BOTTOM OF METADATA 9 | }); -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CordovaCy 4 | @string/app_name 5 | @string/launcher_name 6 | 7 | -------------------------------------------------------------------------------- /electron_twitter/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "allowSyntheticDefaultImports": true 6 | }, 7 | "exclude": [ 8 | "node_modules", 9 | "bower_components", 10 | "jspm_packages", 11 | "tmp", 12 | "temp" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /twitterAPI_express/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Twitter API for Cytoscape.js' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/tasks/_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock -------------------------------------------------------------------------------- /glycolysis/TODO.md: -------------------------------------------------------------------------------- 1 | - Beautify code 2 | - Make sure that Github will serve SVG files for gh-pages 3 | - Finish tutorial by writing about how to animate viewport and add a 'next frame' button 4 | - (Possibly?) Display information on edges 5 | - Would require hard-coding edges instead of dynamically generating them. -------------------------------------------------------------------------------- /cordovacy/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "allowSyntheticDefaultImports": true 6 | }, 7 | "exclude": [ 8 | "node_modules", 9 | "bower_components", 10 | "jspm_packages", 11 | "tmp", 12 | "temp", 13 | "platforms" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/tasks/_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/tasks/_CordovaLib_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/tasks/_CordovaLib_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/tasks/_CordovaLib_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/tasks/_CordovaLib_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/tasks/_CordovaLib_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/tasks/_CordovaLib_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cytoscape.js Tutorials 2 | 3 | [![Join the chat at https://gitter.im/cytoscape/cytoscape.js-tutorials](https://badges.gitter.im/cytoscape/cytoscape.js-tutorials.svg)](https://gitter.im/cytoscape/cytoscape.js-tutorials?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | *Joseph Stahl, for Google Summer of Code* -------------------------------------------------------------------------------- /cordovacy/platforms/android/.gradle/2.13/tasks/_CordovaLib_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cytoscape/cytoscape.js-tutorials/HEAD/cordovacy/platforms/android/.gradle/2.13/tasks/_CordovaLib_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock -------------------------------------------------------------------------------- /electron_twitter/README.md: -------------------------------------------------------------------------------- 1 | ## Installation 2 | 3 | `npm install` 4 | 5 | ## Running 6 | 7 | `npm start` 8 | 9 | ## Configuration 10 | 11 | An `api_key.json` file in the root of the program directory will be used if one exists. 12 | 13 | ```json 14 | { 15 | "key": "twitterAPIKeyHere", 16 | "secret": "twitterAPISecretHere" 17 | } 18 | ``` 19 | -------------------------------------------------------------------------------- /twitterAPI_express/README.md: -------------------------------------------------------------------------------- 1 | # Twitter API for Cytoscape.js Tutorial 2 | 3 | The Twitter API requires API keys to be generated for the user. 4 | Once generated, update the key in `routes/twitter.js` and the secret in the environment variable `TWITTER_CONSUMER_SECRET`. 5 | 6 | 7 | To get API running: 8 | 9 | ```bash 10 | npm install 11 | npm start 12 | ``` 13 | -------------------------------------------------------------------------------- /cordovacy/plugins/android.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": {} 8 | }, 9 | "installed_plugins": { 10 | "cordova-plugin-whitelist": { 11 | "PACKAGE_NAME": "com.josephstahl.cordovacy" 12 | } 13 | }, 14 | "dependent_plugins": {} 15 | } -------------------------------------------------------------------------------- /cordovacy/plugins/browser.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": {} 8 | }, 9 | "installed_plugins": { 10 | "cordova-plugin-whitelist": { 11 | "PACKAGE_NAME": "com.josephstahl.cordovacy" 12 | } 13 | }, 14 | "dependent_plugins": {} 15 | } -------------------------------------------------------------------------------- /electron_twitter/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /electron_twitter/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "globalDevDependencies": { 3 | "bluebird": "registry:dt/bluebird#2.0.0+20160701023356", 4 | "github-electron": "registry:dt/github-electron#1.2.5+20160624085047", 5 | "jquery": "registry:dt/jquery#1.10.0+20160704162008", 6 | "node": "registry:dt/node#6.0.0+20160709114037", 7 | "temp": "registry:dt/temp#0.8.3+20160105142454" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /glycolysis/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=759670 3 | // for the documentation about the jsconfig.json format 4 | "compilerOptions": { 5 | "target": "es6", 6 | "module": "commonjs", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "exclude": [ 10 | "node_modules", 11 | "bower_components", 12 | "jspm_packages", 13 | "tmp", 14 | "temp" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /getting-started/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=759670 3 | // for the documentation about the jsconfig.json format 4 | "compilerOptions": { 5 | "target": "es6", 6 | "module": "commonjs", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "exclude": [ 10 | "node_modules", 11 | "bower_components", 12 | "jspm_packages", 13 | "tmp", 14 | "temp" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /twitter_graph/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=759670 3 | // for the documentation about the jsconfig.json format 4 | "compilerOptions": { 5 | "target": "es6", 6 | "module": "commonjs", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "exclude": [ 10 | "node_modules", 11 | "bower_components", 12 | "jspm_packages", 13 | "tmp", 14 | "temp" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /learning-electron/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=759670 3 | // for the documentation about the jsconfig.json format 4 | "compilerOptions": { 5 | "target": "es6", 6 | "module": "commonjs", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "exclude": [ 10 | "node_modules", 11 | "bower_components", 12 | "jspm_packages", 13 | "tmp", 14 | "temp" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /learning-electron/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learning-electron", 3 | "version": "1.0.0", 4 | "description": "Making a simple Electron app before moving on to Cytoscape", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "electron-prebuilt": "^1.2.5" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /twitterAPI_express/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=759670 3 | // for the documentation about the jsconfig.json format 4 | "compilerOptions": { 5 | "target": "es6", 6 | "module": "commonjs", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "exclude": [ 10 | "node_modules", 11 | "bower_components", 12 | "jspm_packages", 13 | "tmp", 14 | "temp" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /cordovacy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-cy", 3 | "version": "0.1.0", 4 | "description": "", 5 | "main": "echo \"cordova app\"", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "cordova run browser" 9 | }, 10 | "author": "Joseph Stahl", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "bower": "^1.7.9", 14 | "cordova": "^6.3.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /twitterAPI_express/typings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twitterAPI_express", 3 | "dependencies": {}, 4 | "globalDependencies": { 5 | "express": "registry:dt/express#4.0.0+20160317120654", 6 | "express-serve-static-core": "registry:dt/express-serve-static-core#0.0.0+20160617060422", 7 | "node": "registry:dt/node#6.0.0+20160621231320", 8 | "serve-static": "registry:dt/serve-static#0.0.0+20160606155157" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "0.1.0", 5 | "windows": { 6 | "command": "electron_twitter\\node_modules\\.bin\\electron.cmd" 7 | }, 8 | "command": "electron_twitter/node_modules/.bin/electron", 9 | "isShellCommand": true, 10 | "showOutput": "never", 11 | "args": [ 12 | "electron_twitter" 13 | ] 14 | } -------------------------------------------------------------------------------- /learning-electron/cy_graph.js: -------------------------------------------------------------------------------- 1 | var cytoscape = require('./cytoscape'); 2 | 3 | var TestGraph = function() {}; 4 | 5 | TestGraph.prototype.createGraph = function() { 6 | var cy = cytoscape({ 7 | container: document.getElementById('cy'), 8 | layout: { 9 | name: 'grid' 10 | }, 11 | elements: [ 12 | { data: { id: 'a' } } 13 | ] 14 | }); 15 | return cy; 16 | }; 17 | 18 | module.exports = new TestGraph(); 19 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugShaders/merger.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "extends": 'google', 3 | "rules": { 4 | 'linebreak-style': [0, 'unix'], // don't complain about CRLF; Git handles the conversion. 5 | 'object-curly-spacing': [2, 'always'] 6 | }, 7 | "env": { 8 | 'browser': true, 9 | 'node': true, 10 | 'jquery': true 11 | }, 12 | "globals": { 13 | 'cytoscape': false, 14 | 'GlyElements': false 15 | } 16 | }; -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cordovacy/README.md: -------------------------------------------------------------------------------- 1 | [API requests to Wikipedia for links](https://www.mediawiki.org/wiki/API:Links) 2 | Ex: `https://en.wikipedia.org/w/api.php?action=query&titles=Albert%20Einstein&prop=links&format=json` 3 | 4 | Page titles returned will need to have URL encoded (`https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent`). 5 | Once encoded, they should be available for qTip (mobile web display) and clicking to get their links. -------------------------------------------------------------------------------- /twitterAPI_express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twitterAPI_express", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.13.3", 10 | "cookie-parser": "~1.3.5", 11 | "debug": "~2.2.0", 12 | "express": "~4.13.4", 13 | "jade": "~1.11.0", 14 | "morgan": "~1.6.1", 15 | "serve-favicon": "~2.3.0", 16 | "twit": "^2.2.4" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /twitter_graph/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twitter_graph", 3 | "version": "1.0.0", 4 | "description": "Visualize a social network with Cytoscape.js", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node ./node_modules/http-server/bin/http-server" 9 | }, 10 | "author": "Joseph Stahl", 11 | "license": "ISC", 12 | "dependencies": { 13 | "http-server": "^0.9.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /electron_twitter/css/graph_style.css: -------------------------------------------------------------------------------- 1 | #full { 2 | display: flex; 3 | flex-direction: column; 4 | height: 100vh; 5 | } 6 | #cy { 7 | height: 100%; 8 | flex-grow: 1; 9 | } 10 | h1 { 11 | text-align: center; 12 | } 13 | #loading { 14 | position: absolute; 15 | left: 0; 16 | top: 50%; 17 | width: 100%; 18 | text-align: center; 19 | margin-top: -0.5em; 20 | font-size: 2em; 21 | color: #000; 22 | } 23 | .hidden { 24 | display: none; 25 | } -------------------------------------------------------------------------------- /cordovacy/platforms/browser/browser.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": {} 8 | }, 9 | "installed_plugins": { 10 | "cordova-plugin-whitelist": { 11 | "PACKAGE_NAME": "com.josephstahl.cordovacy" 12 | } 13 | }, 14 | "dependent_plugins": {}, 15 | "modules": [], 16 | "plugin_metadata": { 17 | "cordova-plugin-whitelist": "1.2.2" 18 | } 19 | } -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/incremental/mergeDebugAssets/merger.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/generated/source/buildConfig/debug/org/apache/cordova/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Automatically generated file. DO NOT MODIFY 3 | */ 4 | package org.apache.cordova; 5 | 6 | public final class BuildConfig { 7 | public static final boolean DEBUG = Boolean.parseBoolean("true"); 8 | public static final String APPLICATION_ID = "org.apache.cordova"; 9 | public static final String BUILD_TYPE = "debug"; 10 | public static final String FLAVOR = ""; 11 | public static final int VERSION_CODE = 1; 12 | public static final String VERSION_NAME = "1.0"; 13 | } 14 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Indicates whether an apk should be generated for each density. 11 | split.density=false 12 | # Project target. 13 | target=android-23 14 | apk-configurations= 15 | renderscript.opt.level=O0 16 | android.library=true 17 | -------------------------------------------------------------------------------- /cordovacy/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-cy", 3 | "description": "", 4 | "main": "echo \"cordova app\"", 5 | "authors": [ 6 | "Joseph Stahl" 7 | ], 8 | "license": "ISC", 9 | "homepage": "https://github.com/cytoscape/cytoscape.js-tutorials", 10 | "private": true, 11 | "ignore": [ 12 | "**/.*", 13 | "node_modules", 14 | "bower_components", 15 | "test", 16 | "tests" 17 | ], 18 | "dependencies": { 19 | "cytoscape": "^2.7.7", 20 | "skeleton": "^2.0.4", 21 | "font-awesome": "Font-Awesome#^4.6.3", 22 | "jquery": "2.2.4", 23 | "cytoscape-qtip": "^2.4.0", 24 | "qtip2": "^2.2.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | # Project target. 13 | target=android-23 14 | android.library.reference.1=CordovaLib 15 | -------------------------------------------------------------------------------- /cordovacy/plugins/cordova-plugin-whitelist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cordova-plugin-whitelist", 3 | "version": "1.2.2", 4 | "description": "Cordova Whitelist Plugin", 5 | "cordova": { 6 | "platforms": [ 7 | "android" 8 | ] 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "https://github.com/apache/cordova-plugin-whitelist" 13 | }, 14 | "keywords": [ 15 | "cordova", 16 | "whitelist", 17 | "ecosystem:cordova", 18 | "cordova-android" 19 | ], 20 | "engines": [ 21 | { 22 | "name": "cordova-android", 23 | "version": ">=4.0.0" 24 | } 25 | ], 26 | "author": "Apache Software Foundation", 27 | "license": "Apache 2.0" 28 | } 29 | -------------------------------------------------------------------------------- /learning-electron/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello World! 6 | 7 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 28 | 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cytoscape.js-tutorials", 3 | "version": "1.0.0", 4 | "description": "Tutorials for Cytoscape.js", 5 | "main": "twitter_api/main.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/cytoscape/cytoscape.js-tutorials.git" 12 | }, 13 | "author": "Joseph Stahl", 14 | "license": "ISC", 15 | "bugs": { 16 | "url": "https://github.com/cytoscape/cytoscape.js-tutorials/issues" 17 | }, 18 | "homepage": "https://github.com/cytoscape/cytoscape.js-tutorials#readme", 19 | "devDependencies": { 20 | "eslint": "^3.2.2", 21 | "eslint-config-google": "^0.6.0" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /getting-started/temp.js: -------------------------------------------------------------------------------- 1 | elements: [ 2 | // nodes 3 | { data: { id: 'a' } }, 4 | { data: { id: 'b' } }, 5 | { data: { id: 'c' } }, 6 | { data: { id: 'd' } }, 7 | { data: { id: 'e' } }, 8 | { data: { id: 'f' } }, 9 | // edges 10 | { 11 | data: { 12 | id: 'ab', 13 | source: 'a', 14 | target: 'b' 15 | } 16 | }, 17 | { 18 | data: { 19 | id: 'cd', 20 | source: 'c', 21 | target: 'd' 22 | } 23 | }, 24 | { 25 | data: { 26 | id: 'ef', 27 | source: 'e', 28 | target: 'f' 29 | } 30 | }, 31 | { 32 | data: { 33 | id: 'ac', 34 | source: 'a', 35 | target: 'd' 36 | } 37 | }, 38 | { 39 | data: { 40 | id: 'be', 41 | source: 'b', 42 | target: 'e' 43 | } 44 | } 45 | ] -------------------------------------------------------------------------------- /electron_twitter/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "twitter-electron", 3 | "version": "0.1.0", 4 | "main": "main.js", 5 | "dependencies": { 6 | "bluebird": "^3.4.1", 7 | "cytoscape": "^2.7.7", 8 | "cytoscape-qtip": "^2.4.0", 9 | "eslint": "^3.2.2", 10 | "jquery": "^2.2.4", 11 | "mkdirp": "^0.5.1", 12 | "qtip2": "^2.2.0", 13 | "twit": "^2.2.4" 14 | }, 15 | "devDependencies": { 16 | "electron-packager": "^7.5.1", 17 | "electron-prebuilt": "^1.2.8", 18 | "eslint": "^3.1.1", 19 | "eslint-config-google": "^0.6.0" 20 | }, 21 | "scripts": { 22 | "start": "electron .", 23 | "build-win": "electron-packager . --platform=win32 --arch=x64 --out=out/ --ignore=api_key.json", 24 | "build-mac": "electron-packager . --platform=darwin --arch=x64 --out=out/ --ignore=api_key.json" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cordovacy/.gitignore: -------------------------------------------------------------------------------- 1 | # ANDROID / ECLIPSE 2 | 3 | # built application files 4 | *.apk 5 | *.ap_ 6 | 7 | # files for the dex VM 8 | *.dex 9 | 10 | # Java class files 11 | *.class 12 | 13 | # generated files - android project subfolder 14 | Android/bin/ 15 | Android/gen/ 16 | Android/assets/ 17 | 18 | # generated files 19 | bin/ 20 | gen/ 21 | 22 | # Local configuration file (sdk path, etc) 23 | local.properties 24 | 25 | # IOS / Xcode 26 | build/* 27 | *.pbxuser 28 | !default.pbxuser 29 | *.mode1v3 30 | !default.mode1v3 31 | *.mode2v3 32 | !default.mode2v3 33 | *.perspectivev3 34 | !default.perspectivev3 35 | *.xcworkspace 36 | !default.xcworkspace 37 | xcuserdata 38 | profile 39 | *.moved-aside 40 | IOS/www/ 41 | 42 | # OSX 43 | .DS_Store 44 | 45 | # Thumbnails 46 | ._* 47 | 48 | # Files that might appear on external disk 49 | .Spotlight-V100 50 | .Trashes -------------------------------------------------------------------------------- /getting-started/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tutorial 1: Getting Started 8 | 9 | 10 | 11 | 20 | 21 | 22 |
23 | 38 | 39 | -------------------------------------------------------------------------------- /twitter_graph/TODO.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | 3 | # NOTES 4 | - Or look at using Heroku for using API with JS. But start with static data and write program for downloading data later. 5 | - "Centrality" measurement for the graph. Or degree. Mapper for size of node based on degree. Degree is a cy function. Try color or border to correlate with number of tweets. 6 | - Feature set: emphasize layout. At least two layout options for user to choose: 7 | - Concentric (circle) AND physics simulation (force directed like cose or cola) 8 | - Look at Qtip extension for putting in additional statistics about nodes/ edges. Ex: link to their twitter profile. 9 | 10 | # QUESTIONS 11 | - In my tutorial I'm currently leaving in some error handling code (relating to HTTP status codes) but not spending much time explaining the details (because errors shouldn't occur on cached data). Should I keep this or remove it? -------------------------------------------------------------------------------- /cordovacy/platforms/browser/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CordovaCy 4 | 5 | A sample Apache Cordova application that responds to the deviceready event. 6 | 7 | 8 | Joseph Stahl for GSoC 2016 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /glycolysis/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tutorial 2: Glycolysis 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 31 | 32 | 33 |
34 | 35 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CordovaCy 4 | 5 | A sample Apache Cordova application that responds to the deviceready event. 6 | 7 | 8 | Joseph Stahl for GSoC 2016 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/android.json: -------------------------------------------------------------------------------- 1 | { 2 | "prepare_queue": { 3 | "installed": [], 4 | "uninstalled": [] 5 | }, 6 | "config_munge": { 7 | "files": { 8 | "res/xml/config.xml": { 9 | "parents": { 10 | "/*": [ 11 | { 12 | "xml": "", 13 | "count": 1 14 | } 15 | ] 16 | } 17 | } 18 | } 19 | }, 20 | "installed_plugins": { 21 | "cordova-plugin-whitelist": { 22 | "PACKAGE_NAME": "com.josephstahl.cordovacy" 23 | } 24 | }, 25 | "dependent_plugins": {}, 26 | "modules": [], 27 | "plugin_metadata": { 28 | "cordova-plugin-whitelist": "1.2.2" 29 | } 30 | } -------------------------------------------------------------------------------- /cordovacy/platforms/browser/cordova/lib/check_reqs.js: -------------------------------------------------------------------------------- 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 | //add methods as we determine what are the requirements 23 | 24 | var Q = require('q'); 25 | 26 | module.exports.run = function() { 27 | return Q.resolve(); 28 | }; 29 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/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 | // Coho updates this line: 23 | var VERSION = "4.1.0"; 24 | 25 | console.log(VERSION); 26 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/res/xml/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | CordovaCy 8 | 9 | A sample Apache Cordova application that responds to the deviceready event. 10 | 11 | 12 | Apache Cordova Team 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/platforms/browser/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 | ) 27 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/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 | ) 27 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | // Coho updates this line: 23 | var VERSION = "5.2.1"; 24 | 25 | module.exports.version = VERSION; 26 | 27 | if (!module.parent) { 28 | console.log(VERSION); 29 | } 30 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/cordova/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/cordova/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/hooks/Readme.md: -------------------------------------------------------------------------------- 1 | 21 | # Cordova Hooks 22 | 23 | Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide. 24 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | ) -------------------------------------------------------------------------------- /cordovacy/platforms/android/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_version = require('./lib/android_sdk_version'); 23 | 24 | android_sdk_version.run().done(null, function(err) { 25 | console.log(err); 26 | process.exit(2); 27 | }); 28 | 29 | 30 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /cordovacy/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CordovaCy 4 | 5 | A sample Apache Cordova application that responds to the deviceready event. 6 | 7 | 8 | Joseph Stahl for GSoC 2016 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/bundles/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/bundles/debug/aapt/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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().done( 25 | function success() { 26 | console.log('Looks like your environment fully supports cordova-android development!'); 27 | }, function fail(err) { 28 | console.log(err); 29 | process.exit(2); 30 | } 31 | ); 32 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/build/intermediates/incremental/packageDebugResources/merger.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cordovacy/WWW/css/index.css: -------------------------------------------------------------------------------- 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 | html, body { 21 | height: 100%; 22 | } 23 | 24 | #deviceready { 25 | height: 100%; 26 | width: 100%; 27 | } 28 | 29 | .container { 30 | display: flex; 31 | flex-flow: column; 32 | height: 100%; 33 | } 34 | 35 | #deviceready { 36 | position: absolute; 37 | left: 0; 38 | top: 50%; 39 | width: 100%; 40 | text-align: center; 41 | margin-top: -0.5em; 42 | font-size: 2em; 43 | color: #fff; 44 | } 45 | 46 | #cy { 47 | flex: 1 1 auto; 48 | } -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/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 | 23 | var build = require('./lib/build'), 24 | args = process.argv; 25 | 26 | // provide help 27 | if ( args[2] == '--help' || args[2] == '/?' || args[2] == '-h' || args[2] == '/h' || 28 | args[2] == 'help' || args[2] == '-help' || args[2] == '/help') { 29 | build.help(); 30 | process.exit(0); 31 | } else { 32 | 33 | build.run(); 34 | } 35 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/css/index.css: -------------------------------------------------------------------------------- 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 | html, body { 21 | height: 100%; 22 | } 23 | 24 | #deviceready { 25 | height: 100%; 26 | width: 100%; 27 | } 28 | 29 | .container { 30 | display: flex; 31 | flex-flow: column; 32 | height: 100%; 33 | } 34 | 35 | #deviceready { 36 | position: absolute; 37 | left: 0; 38 | top: 50%; 39 | width: 100%; 40 | text-align: center; 41 | margin-top: -0.5em; 42 | font-size: 2em; 43 | color: #fff; 44 | } 45 | 46 | #cy { 47 | flex: 1 1 auto; 48 | } -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | reqs = require('./lib/check_reqs'), 24 | 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().done(function() { 31 | return log.run(); 32 | }, function(err) { 33 | console.error('ERROR: ' + err); 34 | process.exit(2); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/src/com/josephstahl/cordovacy/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.josephstahl.cordovacy; 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 | // Set by in config.xml 32 | loadUrl(launchUrl); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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('../lib/check_reqs').check_android().then(function() { 26 | devices.list().done(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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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('../lib/check_reqs').check_android().then(function() { 26 | emulators.list_started().done(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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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('../lib/check_reqs').check_android().then(function() { 26 | emulators.list_images().done(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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/css/index.css: -------------------------------------------------------------------------------- 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 | #deviceready { 21 | height: 100%; 22 | width: 100%; 23 | } 24 | 25 | .app { 26 | position: absolute; 27 | left: 0%; 28 | top: 0%; 29 | height: 100%; 30 | width: 100%; 31 | } 32 | 33 | .event { 34 | color:#000000; 35 | } 36 | 37 | #loading { 38 | position: absolute; 39 | left: 0; 40 | top: 50%; 41 | width: 100%; 42 | text-align: center; 43 | margin-top: -0.5em; 44 | font-size: 2em; 45 | color: #fff; 46 | } 47 | 48 | .event.listening { 49 | display:block; 50 | } 51 | 52 | .event.received { 53 | display:none; 54 | } 55 | 56 | #cy { 57 | height: 100%; 58 | width: 100%; 59 | } -------------------------------------------------------------------------------- /cordovacy/platforms/browser/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 | 23 | var path = require('path'), 24 | clean = require('./lib/clean'), 25 | reqs = require('./lib/check_reqs'), 26 | args = process.argv; 27 | 28 | // Support basic help commands 29 | if ( args.length > 2 30 | || args[2] == '--help' || args[2] == '/?' || args[2] == '-h' || 31 | args[2] == 'help' || args[2] == '-help' || args[2] == '/help') { 32 | console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'clean')) ); 33 | process.exit(0); 34 | } else { 35 | clean.cleanProject(); 36 | } 37 | 38 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | 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).done(null, function(err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | 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).done(null, function(err) { 36 | console.error('ERROR: ' + err); 37 | process.exit(2); 38 | }); 39 | 40 | -------------------------------------------------------------------------------- /electron_twitter/ui.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tutorial 4 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | 19 |
20 |
21 | 22 |
23 |

Tutorial 4

24 |
25 | 26 |
27 | 28 |
29 | 30 |
31 |
32 | 33 |
34 |
35 | 36 |
37 |
38 | 39 |
40 | 41 | 44 | 45 |
46 |
47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/plugins/cordova-plugin-whitelist/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | # Contributing to Apache Cordova 23 | 24 | Anyone can contribute to Cordova. And we need your contributions. 25 | 26 | There are multiple ways to contribute: report bugs, improve the docs, and 27 | contribute code. 28 | 29 | For instructions on this, start with the 30 | [contribution overview](http://cordova.apache.org/contribute/). 31 | 32 | The details are explained there, but the important items are: 33 | - Sign and submit an Apache ICLA (Contributor License Agreement). 34 | - Have a Jira issue open that corresponds to your contribution. 35 | - Run the tests so your patch doesn't break existing functionality. 36 | 37 | We look forward to your contributions! 38 | -------------------------------------------------------------------------------- /electron_twitter/main.js: -------------------------------------------------------------------------------- 1 | var electron = require('electron'); 2 | // Module to control application life. 3 | var app = electron.app; 4 | // Module to create native browser window. 5 | var BrowserWindow = electron.BrowserWindow; 6 | 7 | 8 | // Keep a global reference of the window object, if you don't, the window will 9 | // be closed automatically when the JavaScript object is garbage collected. 10 | let win; 11 | 12 | function createWindow() { 13 | // Create the browser window. 14 | win = new BrowserWindow({ width: 800, height: 600 }); 15 | 16 | // and load the graph screen 17 | win.loadURL(`file://${__dirname}/index.html`); 18 | 19 | win.on('closed', () => { 20 | win = null; 21 | }); 22 | } 23 | 24 | // This method will be called when Electron has finished 25 | // initialization and is ready to create browser windows. 26 | // Some APIs can only be used after this event occurs. 27 | app.on('ready', createWindow); 28 | 29 | // Quit when all windows are closed. 30 | app.on('window-all-closed', () => { 31 | // On macOS it is common for applications and their menu bar 32 | // to stay active until the user quits explicitly with Cmd + Q 33 | if (process.platform !== 'darwin') { 34 | app.quit(); 35 | } 36 | }); 37 | 38 | app.on('activate', () => { 39 | // On macOS it's common to re-create a window in the app when the 40 | // dock icon is clicked and there are no other windows open. 41 | if (win === null) { 42 | createWindow(); 43 | } 44 | }); 45 | 46 | // In this file you can include the rest of your app's specific main process 47 | // code. You can also put them in separate files and require them here. 48 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | } -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /getting-started/index-addingNodes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tutorial 1: Getting Started 8 | 9 | 10 | 11 | 20 | 21 | 22 |
23 | 64 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | 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).done(null, 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().done(null, function(err) { 39 | console.error('ERROR: ' + err); 40 | process.exit(2); 41 | }); 42 | } 43 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/cordova/lib/clean.js: -------------------------------------------------------------------------------- 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 fs = require('fs'), 23 | shjs = require('shelljs'), 24 | path = require('path'), 25 | check_reqs = require('./check_reqs'), 26 | platformBuildDir = path.join('platforms', 'browser', 'build'); 27 | 28 | exports.cleanProject = function(){ 29 | 30 | // Check that requirements are (stil) met 31 | if (!check_reqs.run()) { 32 | console.error('Please make sure you meet the software requirements in order to clean an browser cordova project'); 33 | process.exit(2); 34 | } 35 | 36 | console.log('Cleaning Browser project'); 37 | try { 38 | if (fs.existsSync(platformBuildDir)) { 39 | shjs.rm('-r', platformBuildDir); 40 | } 41 | } 42 | catch(err) { 43 | console.log('could not remove '+platformBuildDir+' : '+err.message); 44 | } 45 | }; 46 | 47 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/platform.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 | module.exports = { 23 | id: 'browser', 24 | cordovaVersion: '3.4.0', 25 | 26 | bootstrap: function() { 27 | 28 | var modulemapper = require('cordova/modulemapper'); 29 | var channel = require('cordova/channel'); 30 | 31 | modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy'); 32 | 33 | channel.onNativeReady.fire(); 34 | 35 | // FIXME is this the right place to clobber pause/resume? I am guessing not 36 | // FIXME pause/resume should be deprecated IN CORDOVA for pagevisiblity api 37 | document.addEventListener('webkitvisibilitychange', function() { 38 | if (document.webkitHidden) { 39 | channel.onPause.fire(); 40 | } 41 | else { 42 | channel.onResume.fire(); 43 | } 44 | }, false); 45 | 46 | // End of bootstrap 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/platform_www/platform.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 | module.exports = { 23 | id: 'browser', 24 | cordovaVersion: '3.4.0', 25 | 26 | bootstrap: function() { 27 | 28 | var modulemapper = require('cordova/modulemapper'); 29 | var channel = require('cordova/channel'); 30 | 31 | modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy'); 32 | 33 | channel.onNativeReady.fire(); 34 | 35 | // FIXME is this the right place to clobber pause/resume? I am guessing not 36 | // FIXME pause/resume should be deprecated IN CORDOVA for pagevisiblity api 37 | document.addEventListener('webkitvisibilitychange', function() { 38 | if (document.webkitHidden) { 39 | channel.onPause.fire(); 40 | } 41 | else { 42 | channel.onResume.fire(); 43 | } 44 | }, false); 45 | 46 | // End of bootstrap 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/cordova-js-src/platform.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 | module.exports = { 23 | id: 'browser', 24 | cordovaVersion: '3.4.0', 25 | 26 | bootstrap: function() { 27 | 28 | var modulemapper = require('cordova/modulemapper'); 29 | var channel = require('cordova/channel'); 30 | 31 | modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy'); 32 | 33 | channel.onNativeReady.fire(); 34 | 35 | // FIXME is this the right place to clobber pause/resume? I am guessing not 36 | // FIXME pause/resume should be deprecated IN CORDOVA for pagevisiblity api 37 | document.addEventListener('webkitvisibilitychange', function() { 38 | if (document.webkitHidden) { 39 | channel.onPause.fire(); 40 | } 41 | else { 42 | channel.onResume.fire(); 43 | } 44 | }, false); 45 | 46 | // End of bootstrap 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/platform_www/cordova-js-src/platform.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 | module.exports = { 23 | id: 'browser', 24 | cordovaVersion: '3.4.0', 25 | 26 | bootstrap: function() { 27 | 28 | var modulemapper = require('cordova/modulemapper'); 29 | var channel = require('cordova/channel'); 30 | 31 | modulemapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy'); 32 | 33 | channel.onNativeReady.fire(); 34 | 35 | // FIXME is this the right place to clobber pause/resume? I am guessing not 36 | // FIXME pause/resume should be deprecated IN CORDOVA for pagevisiblity api 37 | document.addEventListener('webkitvisibilitychange', function() { 38 | if (document.webkitHidden) { 39 | channel.onPause.fire(); 40 | } 41 | else { 42 | channel.onResume.fire(); 43 | } 44 | }, false); 45 | 46 | // End of bootstrap 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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(process.argv[2]) >= 0) 29 | require('./lib/build').help(); 30 | 31 | // Do some basic argument parsing 32 | var buildOpts = nopt({ 33 | 'verbose' : Boolean, 34 | 'silent' : Boolean, 35 | 'debug' : Boolean, 36 | 'release' : Boolean, 37 | 'nobuild': Boolean, 38 | 'buildConfig' : path 39 | }, { 'd' : '--verbose' }); 40 | 41 | // Make buildOptions compatible with PlatformApi build method spec 42 | buildOpts.argv = buildOpts.argv.original; 43 | 44 | require('./loggingHelper').adjustLoggerLevel(buildOpts); 45 | 46 | new Api().build(buildOpts) 47 | .catch(function(err) { 48 | console.error(err.stack); 49 | process.exit(2); 50 | }); 51 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /twitterAPI_express/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var path = require('path'); 3 | var favicon = require('serve-favicon'); 4 | var logger = require('morgan'); 5 | var cookieParser = require('cookie-parser'); 6 | var bodyParser = require('body-parser'); 7 | 8 | var routes = require('./routes/index'); 9 | var twitter = require('./routes/twitter'); 10 | 11 | var app = express(); 12 | 13 | // view engine setup 14 | app.set('views', path.join(__dirname, 'views')); 15 | app.set('view engine', 'jade'); 16 | 17 | // uncomment after placing your favicon in /public 18 | //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); 19 | app.use(logger('dev')); 20 | app.use(bodyParser.json()); 21 | app.use(bodyParser.urlencoded({ extended: false })); 22 | app.use(cookieParser()); 23 | app.use(express.static(path.join(__dirname, 'public'))); 24 | 25 | app.use(function(req, res, next) { 26 | res.header("Access-Control-Allow-Origin", "*"); 27 | res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); 28 | next(); 29 | }); 30 | 31 | app.use('/', routes); 32 | app.use('/twitter', twitter); 33 | 34 | // catch 404 and forward to error handler 35 | app.use(function(req, res, next) { 36 | var err = new Error('Not Found'); 37 | err.status = 404; 38 | next(err); 39 | }); 40 | 41 | // error handlers 42 | 43 | // development error handler 44 | // will print stacktrace 45 | if (app.get('env') === 'development') { 46 | app.use(function(err, req, res, next) { 47 | res.status(err.status || 500); 48 | res.render('error', { 49 | message: err.message, 50 | error: err 51 | }); 52 | }); 53 | } 54 | 55 | // production error handler 56 | // no stacktraces leaked to user 57 | app.use(function(err, req, res, next) { 58 | res.status(err.status || 500); 59 | res.render('error', { 60 | message: err.message, 61 | error: {} 62 | }); 63 | }); 64 | 65 | 66 | module.exports = app; 67 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/cordova/run: -------------------------------------------------------------------------------- 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 nopt = require('nopt'); 24 | var path = require('path'); 25 | 26 | // Support basic help commands 27 | if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) 28 | require('./lib/run').help(); 29 | 30 | // Do some basic argument parsing 31 | var runOpts = nopt({ 32 | 'verbose' : Boolean, 33 | 'silent' : Boolean, 34 | 'debug' : Boolean, 35 | 'release' : Boolean, 36 | 'nobuild': Boolean, 37 | 'buildConfig' : path, 38 | 'archs' : String, 39 | 'device' : Boolean, 40 | 'emulator': Boolean, 41 | 'target' : String 42 | }, { 'd' : '--verbose' }); 43 | 44 | // Make runOptions compatible with PlatformApi run method spec 45 | runOpts.argv = runOpts.argv.remain; 46 | 47 | require('./loggingHelper').adjustLoggerLevel(runOpts); 48 | 49 | new Api().run(runOpts) 50 | .catch(function(err) { 51 | console.error(err, err.stack); 52 | process.exit(2); 53 | }); 54 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | var CordovaError = require('cordova-common').CordovaError; 21 | 22 | var knownBuilders = { 23 | ant: 'AntBuilder', 24 | gradle: 'GradleBuilder', 25 | none: 'GenericBuilder' 26 | }; 27 | 28 | /** 29 | * Helper method that instantiates and returns a builder for specified build 30 | * type. 31 | * 32 | * @param {String} builderType Builder name to construct and return. Must 33 | * be one of 'ant', 'gradle' or 'none' 34 | * 35 | * @return {Builder} A builder instance for specified build type. 36 | */ 37 | module.exports.getBuilder = function (builderType, projectRoot) { 38 | if (!knownBuilders[builderType]) 39 | throw new CordovaError('Builder ' + builderType + ' is not supported.'); 40 | 41 | try { 42 | var Builder = require('./' + knownBuilders[builderType]); 43 | return new Builder(projectRoot); 44 | } catch (err) { 45 | throw new CordovaError('Failed to instantiate ' + knownBuilders[builderType] + ' builder: ' + err); 46 | } 47 | }; 48 | -------------------------------------------------------------------------------- /twitterAPI_express/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('twitterAPI_express:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /learning-electron/main.js: -------------------------------------------------------------------------------- 1 | const electron = require('electron.js'); 2 | // Module to control application life. 3 | const app = electron.app; 4 | // Module to create native browser window. 5 | const BrowserWindow = electron.BrowserWindow; 6 | 7 | // Keep a global reference of the window object, if you don't, the window will 8 | // be closed automatically when the JavaScript object is garbage collected. 9 | let mainWindow; 10 | 11 | function createWindow() { 12 | // Create the browser window. 13 | mainWindow = new BrowserWindow({ width: 800, height: 600 }); 14 | 15 | // and load the index.html of the app. 16 | mainWindow.loadURL(`file://${__dirname}/index.html`); 17 | 18 | // Open the DevTools. 19 | mainWindow.webContents.openDevTools(); 20 | 21 | // Emitted when the window is closed. 22 | mainWindow.on('closed', function() { 23 | // Dereference the window object, usually you would store windows 24 | // in an array if your app supports multi windows, this is the time 25 | // when you should delete the corresponding element. 26 | mainWindow = null; 27 | }); 28 | } 29 | 30 | // This method will be called when Electron has finished 31 | // initialization and is ready to create browser windows. 32 | // Some APIs can only be used after this event occurs. 33 | app.on('ready', createWindow); 34 | 35 | // Quit when all windows are closed. 36 | app.on('window-all-closed', function() { 37 | // On OS X it is common for applications and their menu bar 38 | // to stay active until the user quits explicitly with Cmd + Q 39 | if (process.platform !== 'darwin') { 40 | app.quit(); 41 | } 42 | }); 43 | 44 | app.on('activate', function() { 45 | // On OS X it's common to re-create a window in the app when the 46 | // dock icon is clicked and there are no other windows open. 47 | if (mainWindow === null) { 48 | createWindow(); 49 | } 50 | }); 51 | 52 | // In this file you can include the rest of your app's specific main process 53 | // code. You can also put them in separate files and require them here. 54 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/CordovaLib/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 | 20 | 21 | buildscript { 22 | repositories { 23 | mavenCentral() 24 | } 25 | 26 | dependencies { 27 | classpath 'com.android.tools.build:gradle:2.1.0' 28 | } 29 | 30 | } 31 | 32 | apply plugin: 'com.android.library' 33 | 34 | ext { 35 | apply from: 'cordova.gradle' 36 | cdvCompileSdkVersion = privateHelpers.getProjectTarget() 37 | cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools() 38 | } 39 | 40 | android { 41 | compileSdkVersion cdvCompileSdkVersion 42 | buildToolsVersion cdvBuildToolsVersion 43 | publishNonDefault true 44 | 45 | compileOptions { 46 | sourceCompatibility JavaVersion.VERSION_1_6 47 | targetCompatibility JavaVersion.VERSION_1_6 48 | } 49 | 50 | sourceSets { 51 | main { 52 | manifest.srcFile 'AndroidManifest.xml' 53 | java.srcDirs = ['src'] 54 | resources.srcDirs = ['src'] 55 | aidl.srcDirs = ['src'] 56 | renderscript.srcDirs = ['src'] 57 | res.srcDirs = ['res'] 58 | assets.srcDirs = ['assets'] 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/index.html: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Hello World 28 | 29 | 30 |
31 |

Apache Cordova

32 | 36 |
37 | 38 | 39 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/js/index.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 | var app = { 20 | // Application Constructor 21 | initialize: function() { 22 | this.bindEvents(); 23 | }, 24 | // Bind Event Listeners 25 | // 26 | // Bind any events that are required on startup. Common events are: 27 | // 'load', 'deviceready', 'offline', and 'online'. 28 | bindEvents: function() { 29 | document.addEventListener('deviceready', this.onDeviceReady, false); 30 | }, 31 | // deviceready Event Handler 32 | // 33 | // The scope of 'this' is the event. In order to call the 'receivedEvent' 34 | // function, we must explicity call 'app.receivedEvent(...);' 35 | onDeviceReady: function() { 36 | app.receivedEvent('deviceready'); 37 | }, 38 | // Update DOM on a Received Event 39 | receivedEvent: function(id) { 40 | var parentElement = document.getElementById(id); 41 | var listeningElement = parentElement.querySelector('.listening'); 42 | var receivedElement = parentElement.querySelector('.received'); 43 | 44 | listeningElement.setAttribute('style', 'display:none;'); 45 | receivedElement.setAttribute('style', 'display:block;'); 46 | 47 | console.log('Received Event: ' + id); 48 | } 49 | }; 50 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /twitter_graph/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tutorial 3: Twitter 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 58 | 59 | 60 |
61 |
62 | 63 |
64 |
65 | 66 | 67 | 68 |
69 |
70 | 71 |
72 | 73 | -------------------------------------------------------------------------------- /cordovacy/plugins/cordova-plugin-whitelist/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 24 | Whitelist 25 | Cordova Network Whitelist Plugin 26 | Apache 2.0 27 | cordova,whitelist,policy 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in. 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /getting-started/index-layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tutorial 1: Getting Started 8 | 9 | 10 | 11 | 20 | 21 | 22 |
23 | 85 | -------------------------------------------------------------------------------- /cordovacy/WWW/js/index.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 | var app = { 20 | // Application Constructor 21 | initialize: function() { 22 | this.bindEvents(); 23 | }, 24 | // Bind Event Listeners 25 | // 26 | // Bind any events that are required on startup. Common events are: 27 | // 'load', 'deviceready', 'offline', and 'online'. 28 | bindEvents: function() { 29 | document.addEventListener('deviceready', this.onDeviceReady, false); 30 | }, 31 | // deviceready Event Handler 32 | // 33 | // The scope of 'this' is the event. In order to call the 'receivedEvent' 34 | // function, we must explicitly call 'app.receivedEvent(...);' 35 | onDeviceReady: function() { 36 | app.receivedEvent('deviceready'); 37 | }, 38 | // Update DOM on a Received Event 39 | receivedEvent: function(id) { 40 | var parentElement = document.getElementById(id); 41 | var listeningElement = parentElement.querySelector('.listening'); 42 | // var receivedElement = parentElement.querySelector('.received'); 43 | 44 | listeningElement.setAttribute('style', 'display:none;'); 45 | // receivedElement.setAttribute('style', 'display:block;'); 46 | 47 | console.log('Received Event: ' + id); 48 | // deviceready event should also resize the cy graph 49 | window.cy.resize().center(); 50 | } 51 | }; 52 | 53 | app.initialize(); 54 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/assets/www/js/index.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 | var app = { 20 | // Application Constructor 21 | initialize: function() { 22 | this.bindEvents(); 23 | }, 24 | // Bind Event Listeners 25 | // 26 | // Bind any events that are required on startup. Common events are: 27 | // 'load', 'deviceready', 'offline', and 'online'. 28 | bindEvents: function() { 29 | document.addEventListener('deviceready', this.onDeviceReady, false); 30 | }, 31 | // deviceready Event Handler 32 | // 33 | // The scope of 'this' is the event. In order to call the 'receivedEvent' 34 | // function, we must explicitly call 'app.receivedEvent(...);' 35 | onDeviceReady: function() { 36 | app.receivedEvent('deviceready'); 37 | }, 38 | // Update DOM on a Received Event 39 | receivedEvent: function(id) { 40 | var parentElement = document.getElementById(id); 41 | var listeningElement = parentElement.querySelector('.listening'); 42 | var receivedElement = parentElement.querySelector('.received'); 43 | 44 | listeningElement.setAttribute('style', 'display:none;'); 45 | receivedElement.setAttribute('style', 'display:block;'); 46 | 47 | console.log('Received Event: ' + id); 48 | // deviceready event should also resize the cy graph 49 | window.cy.resize().center(); 50 | } 51 | }; 52 | 53 | app.initialize(); 54 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/cordova/lib/log.js: -------------------------------------------------------------------------------- 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 path = require('path'), 23 | os = require('os'), 24 | Q = require('q'), 25 | child_process = require('child_process'), 26 | ROOT = path.join(__dirname, '..', '..'); 27 | 28 | /* 29 | * Starts running logcat in the shell. 30 | * Returns a promise. 31 | */ 32 | module.exports.run = function() { 33 | var d = Q.defer(); 34 | var adb = child_process.spawn('adb', ['logcat'], {cwd: os.tmpdir()}); 35 | 36 | adb.stdout.on('data', function(data) { 37 | var lines = data ? data.toString().split('\n') : []; 38 | var out = lines.filter(function(x) { return x.indexOf('nativeGetEnabledTags') < 0; }); 39 | console.log(out.join('\n')); 40 | }); 41 | 42 | adb.stderr.on('data', console.error); 43 | adb.on('close', function(code) { 44 | if (code > 0) { 45 | d.reject('Failed to run logcat command.'); 46 | } else d.resolve(); 47 | }); 48 | 49 | return d.promise; 50 | }; 51 | 52 | module.exports.help = function() { 53 | console.log('Usage: ' + path.relative(process.cwd(), path.join(ROOT, 'cordova', 'log'))); 54 | console.log('Gives the logcat output on the command line.'); 55 | process.exit(0); 56 | }; 57 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/www/js/index.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 | var app = { 20 | // Application Constructor 21 | initialize: function() { 22 | this.bindEvents(); 23 | }, 24 | // Bind Event Listeners 25 | // 26 | // Bind any events that are required on startup. Common events are: 27 | // 'load', 'deviceready', 'offline', and 'online'. 28 | bindEvents: function() { 29 | document.addEventListener('deviceready', this.onDeviceReady, false); 30 | }, 31 | // deviceready Event Handler 32 | // 33 | // The scope of 'this' is the event. In order to call the 'receivedEvent' 34 | // function, we must explicitly call 'app.receivedEvent(...);' 35 | onDeviceReady: function() { 36 | app.receivedEvent('deviceready'); 37 | }, 38 | // Update DOM on a Received Event 39 | receivedEvent: function(id) { 40 | var parentElement = document.getElementById(id); 41 | var listeningElement = parentElement.querySelector('.listening'); 42 | // var receivedElement = parentElement.querySelector('.received'); 43 | 44 | listeningElement.setAttribute('style', 'display:none;'); 45 | // receivedElement.setAttribute('style', 'display:block;'); 46 | 47 | console.log('Received Event: ' + id); 48 | // deviceready event should also resize the cy graph 49 | window.cy.resize().center(); 50 | } 51 | }; 52 | 53 | app.initialize(); 54 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/node 2 | 3 | ### Node ### 4 | # Logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | 9 | # Runtime data 10 | pids 11 | *.pid 12 | *.seed 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # node-waf configuration 27 | .lock-wscript 28 | 29 | # Compiled binary addons (http://nodejs.org/api/addons.html) 30 | build/Release 31 | 32 | # Dependency directories 33 | node_modules 34 | jspm_packages 35 | 36 | # Optional npm cache directory 37 | .npm 38 | 39 | # Optional REPL history 40 | .node_repl_history 41 | 42 | 43 | ### Typings ### 44 | ## Ignore downloaded typings 45 | typings 46 | 47 | 48 | ### User defined ### 49 | .env 50 | 51 | ### Bower ### 52 | bower_components 53 | .bower-cache 54 | .bower-registry 55 | .bower-tmp 56 | 57 | 58 | # Created by https://www.gitignore.io/api/windows,macos,linux 59 | 60 | ### Windows ### 61 | # Windows image file caches 62 | Thumbs.db 63 | ehthumbs.db 64 | 65 | # Folder config file 66 | Desktop.ini 67 | 68 | # Recycle Bin used on file shares 69 | $RECYCLE.BIN/ 70 | 71 | # Windows Installer files 72 | *.cab 73 | *.msi 74 | *.msm 75 | *.msp 76 | 77 | # Windows shortcuts 78 | *.lnk 79 | 80 | 81 | ### macOS ### 82 | *.DS_Store 83 | .AppleDouble 84 | .LSOverride 85 | 86 | 87 | # Thumbnails 88 | ._* 89 | 90 | # Files that might appear in the root of a volume 91 | .DocumentRevisions-V100 92 | .fseventsd 93 | .Spotlight-V100 94 | .TemporaryItems 95 | .Trashes 96 | .VolumeIcon.icns 97 | .com.apple.timemachine.donotpresent 98 | 99 | # Directories potentially created on remote AFP share 100 | .AppleDB 101 | .AppleDesktop 102 | Network Trash Folder 103 | Temporary Items 104 | .apdisk 105 | 106 | 107 | ### Linux ### 108 | *~ 109 | 110 | # temporary files which can be created if a process still has a handle open of a deleted file 111 | .fuse_hidden* 112 | 113 | # KDE directory preferences 114 | .directory 115 | 116 | # Linux trash folder which might appear on any partition or disk 117 | .Trash-* 118 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/cordova/lib/build.js: -------------------------------------------------------------------------------- 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 path = require('path'), 23 | fs = require('fs'), 24 | shjs = require('shelljs'), 25 | zip = require('adm-zip'), 26 | Q = require('q'), 27 | clean = require('./clean'), 28 | check_reqs = require('./check_reqs'), 29 | platformWwwDir = path.join('platforms', 'browser', 'www'), 30 | platformBuildDir = path.join('platforms', 'browser', 'build'), 31 | packageFile = path.join(platformBuildDir, 'package.zip'); 32 | 33 | /** 34 | * run 35 | * Creates a zip file int platform/build folder 36 | */ 37 | module.exports.run = function(){ 38 | 39 | return check_reqs.run() 40 | .then(function(){ 41 | return clean.cleanProject(); 42 | }, 43 | function checkReqsError(err){ 44 | console.error('Please make sure you meet the software requirements in order to build a browser cordova project'); 45 | }) 46 | .then(function(){ 47 | 48 | if (!fs.existsSync(platformBuildDir)) { 49 | fs.mkdirSync(platformBuildDir); 50 | } 51 | 52 | // add the project to a zipfile 53 | var zipFile = zip(); 54 | zipFile.addLocalFolder(platformWwwDir, '.'); 55 | zipFile.writeZip(packageFile); 56 | 57 | return Q.resolve(); 58 | 59 | }); 60 | }; 61 | 62 | module.exports.help = function() { 63 | console.log('Usage: cordova build browser'); 64 | console.log('Build will create the packaged app in \''+platformBuildDir+'\'.'); 65 | }; 66 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | } -------------------------------------------------------------------------------- /cordovacy/platforms/android/cordova/lib/android_sdk_version.js: -------------------------------------------------------------------------------- 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 child_process = require('child_process'), 23 | Q = require('q'); 24 | 25 | var get_highest_sdk = function(results){ 26 | var reg = /\d+/; 27 | var apiLevels = []; 28 | for(var i=0;i getPluginEntries() { 62 | return parser.getPluginEntries(); 63 | } 64 | 65 | public static CordovaPreferences getPreferences() { 66 | return parser.getPreferences(); 67 | } 68 | 69 | public static boolean isInitialized() { 70 | return parser != null; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | //Added because lint can't see the conditional RIGHT ABOVE this 35 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 36 | public SystemCookieManager(WebView webview) { 37 | webView = webview; 38 | cookieManager = CookieManager.getInstance(); 39 | 40 | //REALLY? Nobody has seen this UNTIL NOW? 41 | cookieManager.setAcceptFileSchemeCookies(true); 42 | 43 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 44 | cookieManager.setAcceptThirdPartyCookies(webView, true); 45 | } 46 | } 47 | 48 | public void setCookiesEnabled(boolean accept) { 49 | cookieManager.setAcceptCookie(accept); 50 | } 51 | 52 | public void setCookie(final String url, final String value) { 53 | cookieManager.setCookie(url, value); 54 | } 55 | 56 | public String getCookie(final String url) { 57 | return cookieManager.getCookie(url); 58 | } 59 | 60 | public void clearCookies() { 61 | cookieManager.removeAllCookie(); 62 | } 63 | 64 | public void flush() { 65 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 66 | cookieManager.flush(); 67 | } 68 | } 69 | }; 70 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/cordova/lib/retry.js: -------------------------------------------------------------------------------- 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 | /* jshint node: true */ 23 | 24 | 'use strict'; 25 | 26 | var events = require('cordova-common').events; 27 | 28 | /* 29 | * Retry a promise-returning function a number of times, propagating its 30 | * results on success or throwing its error on a failed final attempt. 31 | * 32 | * @arg {Number} attemts_left - The number of times to retry the passed call. 33 | * @arg {Function} promiseFunction - A function that returns a promise. 34 | * @arg {...} - Arguments to pass to promiseFunction. 35 | * 36 | * @returns {Promise} 37 | */ 38 | module.exports.retryPromise = function (attemts_left, promiseFunction) { 39 | 40 | // NOTE: 41 | // get all trailing arguments, by skipping the first two (attemts_left and 42 | // promiseFunction) because they shouldn't get passed to promiseFunction 43 | var promiseFunctionArguments = Array.prototype.slice.call(arguments, 2); 44 | 45 | return promiseFunction.apply(undefined, promiseFunctionArguments).then( 46 | 47 | // on success pass results through 48 | function onFulfilled(value) { 49 | return value; 50 | }, 51 | 52 | // on rejection either retry, or throw the error 53 | function onRejected(error) { 54 | 55 | attemts_left -= 1; 56 | 57 | if (attemts_left < 1) { 58 | throw error; 59 | } 60 | 61 | events.emit('verbose', 'A retried call failed. Retrying ' + attemts_left + ' more time(s).'); 62 | 63 | // retry call self again with the same arguments, except attemts_left is now lower 64 | var fullArguments = [attemts_left, promiseFunction].concat(promiseFunctionArguments); 65 | return module.exports.retryPromise.apply(undefined, fullArguments); 66 | } 67 | ); 68 | }; 69 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | mavenCentral() 24 | } 25 | 26 | // Switch the Android Gradle plugin version requirement depending on the 27 | // installed version of Gradle. This dependency is documented at 28 | // http://tools.android.com/tech-docs/new-build-system/version-compatibility 29 | // and https://issues.apache.org/jira/browse/CB-8143 30 | if (gradle.gradleVersion >= "2.2") { 31 | dependencies { 32 | classpath 'com.android.tools.build:gradle:1.0.0+' 33 | } 34 | } else if (gradle.gradleVersion >= "2.1") { 35 | dependencies { 36 | classpath 'com.android.tools.build:gradle:0.14.0+' 37 | } 38 | } else { 39 | dependencies { 40 | classpath 'com.android.tools.build:gradle:0.12.0+' 41 | } 42 | } 43 | } 44 | 45 | apply plugin: 'com.android.library' 46 | 47 | dependencies { 48 | compile fileTree(dir: 'libs', include: '*.jar') 49 | debugCompile project(path: ":CordovaLib", configuration: "debug") 50 | releaseCompile project(path: ":CordovaLib", configuration: "release") 51 | } 52 | 53 | android { 54 | compileSdkVersion cdvCompileSdkVersion 55 | buildToolsVersion cdvBuildToolsVersion 56 | publishNonDefault true 57 | 58 | compileOptions { 59 | sourceCompatibility JavaVersion.VERSION_1_6 60 | targetCompatibility JavaVersion.VERSION_1_6 61 | } 62 | 63 | sourceSets { 64 | main { 65 | manifest.srcFile 'AndroidManifest.xml' 66 | java.srcDirs = ['src'] 67 | resources.srcDirs = ['src'] 68 | aidl.srcDirs = ['src'] 69 | renderscript.srcDirs = ['src'] 70 | res.srcDirs = ['res'] 71 | assets.srcDirs = ['assets'] 72 | jniLibs.srcDirs = ['libs'] 73 | } 74 | } 75 | } 76 | 77 | if (file('build-extras.gradle').exists()) { 78 | apply from: 'build-extras.gradle' 79 | } 80 | -------------------------------------------------------------------------------- /cordovacy/platforms/browser/cordova/run: -------------------------------------------------------------------------------- 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 fs = require('fs'), 23 | path = require('path'), 24 | nopt = require('nopt'), 25 | url = require('url'), 26 | cordovaServe = require('cordova-serve'); 27 | 28 | var args = process.argv; 29 | 30 | start(args); 31 | 32 | function start(argv) { 33 | var args = nopt({'help': Boolean, 'target': String, 'port': Number}, {'help': ['/?', '-h', 'help', '-help', '/help']}, argv); 34 | if(args.help) { 35 | help(); 36 | } 37 | 38 | // defaults 39 | args.port = args.port || 8000; 40 | args.target = args.target || "chrome"; 41 | 42 | var root = path.join(__dirname, '../'), 43 | configFile = path.resolve(path.join(root, 'config.xml')), 44 | configXML = fs.readFileSync(configFile, 'utf8'), 45 | sourceFile = / ] [ --port= ]"); 62 | console.log(" --target= : Launches the specified browser. Chrome is default."); 63 | console.log(" --port= : Http server uses specified port number."); 64 | console.log("Examples:"); 65 | console.log(" run"); 66 | console.log(" run -- --target=ie"); 67 | console.log(" run -- --target=chrome --port=8000"); 68 | console.log(""); 69 | process.exit(0); 70 | } 71 | -------------------------------------------------------------------------------- /cordovacy/platforms/android/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 | --------------------------------------------------------------------------------