Commit graph

43 commits

Author SHA1 Message Date
Chris Garrity
1420a5947a Split iOS and Android interfaces
Refactor the native interface in preparation for switching iOS to use WKWebview.
* Finally rename the folder for device specific interfaces as `tablet` instead of `iPad`
* Update `import` statements to use the new name
* Create new `iOS.js` and `Android.js` based on previous `iPad/iOS.js` to separate the interfaces
* Add new `OS.js` class to manage the class variables, initialize the device interface delegate methods to the correct interface.
* refactor how  `utils/lib` detects the current platform based on `navigtor.userAgent` based on https://stackoverflow.com/questions/37591279/detect-if-user-is-using-webview-for-android-ios-or-a-regular-browser. previous method relied on the Android interface being loaded or not. It can be difficult to detect the difference between in a browser and in a webview, but for now ScratchJr doesn’t need to worry about running in a browser
2020-08-10 09:11:47 -04:00
Chris Garrity
c8f655447a Address comments 2019-10-25 12:27:32 -04:00
Chris Garrity
b965440709 Switch to firebase analytics
* Remove ScratchJrApplication class - it was only being used to initialize the old Google Analytics.
* Change AppUsage (home, school, other, noanswer) from being a prefix on `label` to being a Firebase user property.
* Set the user property when loading the index page - it shouldn’t change for the rest of the session.
2019-10-21 10:48:03 -04:00
chrisgarrity
2da0c818bf
Merge pull request #192 from Murkantilism/develop
Replaced hardcoded value of 136 with a variable.
2018-10-29 09:05:17 -04:00
Deniz Ozkaynak
844765bde6
Created a variable to replace a hardcoded value
In ../src/editor/ui/UI.js there's a random hardcoded value of 136 that helps determine the scale of fullscreen mode. Not sure what this number represents but it should be a variable.
2018-10-13 20:35:10 -04:00
Donald
29ebbeece6 Code format & sort npm script params 2018-09-11 14:27:15 +08:00
Donald
d60ea5e7cb Upgrade webpack to 4.18.0
Add 'watch' and 'dev' npm scripts
2018-09-11 14:13:38 +08:00
chrisgarrity
9336953985 Add languages
Added:
- German
- Japanese
- Portuguese
- Swedish
- Chinese (China)

Needed to modify Localization utilities to handle China locale in additional to language.
2017-09-16 14:33:28 -04:00
chrisgarrity
0f2c31bfc9 Add documentation for AppUsage
Also make ternary operators easier to read.
2017-08-23 11:53:13 -04:00
chrisgarrity
1862c41394 Revise cookie 2017-08-14 15:58:57 -04:00
chrisgarrity
852df3edbb Add splash page for usage tracking
* Adds a usage cookie
* Only asks for usage on first launch
* will need checking with the official version to make sure the right elements are showing/hiding.
2017-08-10 10:00:22 -04:00
chrisgarrity
f752ff5760 Fix formatting and restart bug
In the current system you can’t have the same sound playing more than once at the same time - this is how it was implemented on Android, so we used the same restriction on iOS.

However in the previous version if you interrupted the sound to play it again, it continued from where it was instead of starting over. So it didn’t appear to do anything. Added resetting the current time to 0.0 on play to restart sounds.
2017-03-14 14:31:18 -04:00
chrisgarrity
e9d0d0d7be Change iOS to use native sound.
This is after the coding session with Paula - mostly just clean up of obsolete code and leftover debugging output.
2017-03-08 11:16:31 -05:00
chrisgarrity
6a6d92e06b [WIP] new audio engine
Post coding session with Paula
2017-02-21 17:17:35 -05:00
chrisgarrity
9923c34e76 Add new languages to ScratchJr
Needed slight adjustment to css for settings
added new language codes to settings.json and Localizations.js
2016-09-06 17:33:17 -04:00
Tim Mickel
693698c514 SVG2Canvas.processXMLnode to not getElementById
This addresses #29 in iOS, which was causing photos in thumbnails to not crop. A note about what was going on is included in the code.
2016-03-24 14:05:45 -04:00
Tim Mickel
db3724072f Only polyfill window.Intl when it doesn't exist
The Chrome Webview already had an existing window.Intl. This was causing an assignment error.
2016-02-08 12:33:33 -05:00
Tim Mickel
de99fabacc Fixing broken iOS import in ScratchAudio 2016-02-03 11:32:46 -05:00
Tim Mickel
6cde452728 Add getter for currentLocale to Localization.js #465 2016-02-03 11:19:28 -05:00
Tim Mickel
9814b2a7ce Provide top-level window.ScratchAudio to iframes 2016-02-02 17:31:16 -05:00
Tim Mickel
def37de218 Adding module about page and include roots
Localization, MediaLib, and Settings loads need an adjustable path for now because inapp/ pages are in a subdirectory.
2016-02-01 11:57:41 -05:00
Tim Mickel
3e0a600953 Fixing window.Settings in Localization util 2016-01-22 16:20:03 -05:00
Tim Mickel
d062dbf4ac Make Localization.includeLocales async 2016-01-22 15:42:56 -05:00
Tim Mickel
0c65882bd0 Moving Settings to window.Settings 2016-01-22 15:42:42 -05:00
Tim Mickel
878e5597b3 Fixing value of Events.dragDiv 2016-01-21 16:49:58 -05:00
Tim Mickel
c194ca8c2b Adding requires for Intl.js locale-data 2016-01-21 16:12:04 -05:00
Tim Mickel
5c65dff9c9 Converting broken exports to getters/setters 2016-01-20 16:33:27 -05:00
Tim Mickel
b22973207a Fixing SVG2Canvas "dispatch tables" 2016-01-13 18:58:39 -05:00
Tim Mickel
2a5ce50122 Fixing broken imports 2016-01-13 18:55:15 -05:00
Tim Mickel
0650f47071 Fixing broken static function in Home.js, SVG2Canvas.js 2016-01-13 18:55:03 -05:00
Tim Mickel
fdd74a411c DrawPath module 2016-01-13 17:30:57 -05:00
Tim Mickel
8174793126 utils/Events.js module 2016-01-13 17:27:56 -05:00
Tim Mickel
620aa133b2 SVG2Canvas module 2016-01-13 17:18:25 -05:00
Tim Mickel
2fa0f3bed4 Sound.js module 2016-01-13 16:46:29 -05:00
Tim Mickel
667e1d4e62 Removing illegal read-only sampleRate set 2016-01-13 15:54:50 -05:00
Tim Mickel
640828085b Module version of ScratchAudio.js 2016-01-13 15:54:27 -05:00
Tim Mickel
b4b79d82ee Updating preprocessAndLoadCss to work async 2016-01-13 15:30:06 -05:00
Tim Mickel
f16a22c346 Switching lib to use function exports 2016-01-13 15:05:55 -05:00
Tim Mickel
7dec89ddb3 Fix localization includes and remove default locale messages 2016-01-13 14:51:47 -05:00
Tim Mickel
ba6846f049 Merge conflicts on Localization.js 2016-01-13 14:05:50 -05:00
Tim Mickel
960a4c43ff Updating localization includes to use short codes 2016-01-12 15:12:19 -05:00
Tim Mickel
41522cf4f1 Modules pass 2016-01-12 15:08:37 -05:00
Tim Mickel
e88af5b6df Initial commit 2016-01-08 14:31:04 -05:00