Skip to content
Open
Changes from 1 commit
Commits
Show all changes
2740 commits
Select commit Hold shift + click to select a range
7f68eac
whoops, forgot to git add these tests
pgbovine Jun 13, 2018
04da8a4
added new import tests
pgbovine Jun 13, 2018
2ba806c
tiny
pgbovine Jun 13, 2018
c8611dc
updated
pgbovine Jun 13, 2018
c878231
tiny
pgbovine Jun 13, 2018
1bdd93e
added support for a 'new' IMPORTED_FAUX_PRIMITIVE type
pgbovine Jun 13, 2018
5324579
subtle simplification!
pgbovine Jun 14, 2018
931af51
compiled
pgbovine Jun 14, 2018
4e9a1f9
Update unsupported-features.md
pgbovine Jun 14, 2018
11a4f3a
more flexible type check in objInAlwaysNestTypes
pgbovine Jun 14, 2018
39bbda7
added
pgbovine Jun 14, 2018
5461d71
added Python backend support for rendering default argument values
pgbovine Jun 14, 2018
28b46d0
added frontend support for rendering python default arguments
pgbovine Jun 14, 2018
bf61ded
compiled
pgbovine Jun 14, 2018
b170a90
added regression tests
pgbovine Jun 14, 2018
85ac747
Update unsupported-features.md
pgbovine Jun 14, 2018
43f37d3
Update unsupported-features.md
pgbovine Jun 14, 2018
bd41da7
added some subtlety to what's considered an externally-defined object
pgbovine Jun 14, 2018
6b90cfd
supported printing of class fields/values in INSTANCE_PPRINT
pgbovine Jun 14, 2018
069ec17
compiled
pgbovine Jun 14, 2018
ab0a3e9
filtered out some trivial __str__ printouts for cleanliness
pgbovine Jun 14, 2018
b9e1588
updated test suite
pgbovine Jun 14, 2018
4be56a6
added new tests
pgbovine Jun 14, 2018
8e13e6c
added support for a lot of more python module imports
pgbovine Jun 15, 2018
8b54706
test suite updates
pgbovine Jun 15, 2018
f63456d
slightly cleaned up rendering code
pgbovine Jun 15, 2018
3be4914
compiled
pgbovine Jun 15, 2018
9fc71e1
test updates
pgbovine Jun 15, 2018
c4a28b4
cPickle isn't in py3, redundant with pickle anyhow
pgbovine Jun 15, 2018
0ebcbcc
updated list of allowed python modules in html footer
pgbovine Jun 15, 2018
b0e5cb2
cut out cPickle and sqlite since they don't work on py3
pgbovine Jun 15, 2018
8275bc0
compiled
pgbovine Jun 15, 2018
75b7740
updated tests
pgbovine Jun 15, 2018
8abaeeb
remove inspect as well
pgbovine Jun 15, 2018
1c69f95
bam
pgbovine Jun 15, 2018
cc989ed
don't ban any python builtins anymore; that's just security by obscurity
pgbovine Jun 16, 2018
2f896ca
minor
pgbovine Jun 16, 2018
3a09dbe
more robust version of prior tweak
pgbovine Jun 16, 2018
86890e6
added test
pgbovine Jun 16, 2018
0ef9848
Update unsupported-features.md
pgbovine Jun 16, 2018
4db336a
small footer tweaks
pgbovine Jun 16, 2018
8e3b0aa
added experimental python-anaconda cokapi backend
pgbovine Jun 16, 2018
96026f8
minor
pgbovine Jun 16, 2018
3a35152
added tree.trace test
pgbovine Jun 16, 2018
4994cfc
added /exec_pyanaconda* endpoint
pgbovine Jun 16, 2018
c6fa4d8
tiny
pgbovine Jun 16, 2018
2fd8869
added --allmodules option
pgbovine Jun 16, 2018
765c69c
Merge branch 'master' of github.com:pgbovine/OnlinePythonTutor
pgbovine Jun 16, 2018
6eae578
started cleaning up cruft from pg_logger.py
pgbovine Jun 16, 2018
20b5d9a
removed more crufty old code
pgbovine Jun 16, 2018
2508c98
move preemptive module loading to right before user code is run
pgbovine Jun 16, 2018
f45605e
moar
pgbovine Jun 16, 2018
871cc93
bugfix
pgbovine Jun 16, 2018
dbba720
minor
pgbovine Jun 16, 2018
57d934d
preload optimizations
pgbovine Jun 17, 2018
57df711
minor
pgbovine Jun 17, 2018
894dd04
comments
pgbovine Jun 17, 2018
9c32a31
more generalized preimport heuristic using ast.parse()
pgbovine Jun 17, 2018
bc66ed2
added experimental py3anaconda option for running Python with Anaconda
pgbovine Jun 17, 2018
f9af216
added pyanaconda experimental option for running python with anaconda
pgbovine Jun 17, 2018
bda8b72
compiled
pgbovine Jun 17, 2018
beb3d46
Merge branch 'master' of github.com:pgbovine/OnlinePythonTutor
pgbovine Jun 17, 2018
b7b3ad0
pythontutor_hide now supports unix-style shell globs,
pgbovine Jun 17, 2018
1b816d8
put '\n' -> '<br/>' into htmlspecialchars
pgbovine Jun 17, 2018
25cf753
compiled
pgbovine Jun 17, 2018
2dd53b3
added more documentation and signaling for "Python 3.6 with Anaconda"
pgbovine Jun 17, 2018
dff3e1c
compiled
pgbovine Jun 17, 2018
53dea9c
Update unsupported-features.md
pgbovine Jun 17, 2018
9ae2cc2
Update unsupported-features.md
pgbovine Jun 17, 2018
86c619d
Update unsupported-features.md
pgbovine Jun 17, 2018
48fe6a8
support options in /exec_pyanaconda_
pgbovine Jun 17, 2018
0d2c867
passed raw_input_json into cokapi.com jsonp calls
pgbovine Jun 17, 2018
8e6ac6f
Merge branch 'master' of github.com:pgbovine/OnlinePythonTutor
pgbovine Jun 17, 2018
e35cf56
remove struct and glob from allowed modules
pgbovine Jun 17, 2018
82a30ec
added a 'generate_json_trace.py' string check for externally-defined …
pgbovine Jun 17, 2018
d6ae301
updated tests a bit
pgbovine Jun 17, 2018
de36c05
started implementing #pythontutor_inline_type: option
pgbovine Jun 17, 2018
a312a99
implemented first draft of '#pythontutor_hide_type:'
pgbovine Jun 17, 2018
a1165da
added anaconda into iframe-embed-demo.html
pgbovine Jun 17, 2018
a3d9175
subtle
pgbovine Jun 18, 2018
40caa94
test suite updates
pgbovine Jun 18, 2018
a12e0c3
disable pg-hello-geolocate due to ipstack.com API limits
pgbovine Jun 22, 2018
94e7c54
disabled pg-hello-geolocate in frontend
pgbovine Jun 22, 2018
220d8e4
compiled
pgbovine Jun 22, 2018
6493f82
added numEditCodeEventsByClientId subtlety (see comments for details)
pgbovine Jun 22, 2018
3589c35
tiny
pgbovine Jun 22, 2018
579867b
added a noRepeats option to get live help survey questions
pgbovine Jun 25, 2018
0dcdacc
compiled
pgbovine Jun 25, 2018
fb0b822
restored older behavior before mid-June 2018 change to defaults
pgbovine Jul 5, 2018
ce32d2d
compiled
pgbovine Jul 5, 2018
70bfcf1
Fix #229 - remove unprotected localStorage access.
liffiton Jul 24, 2018
a06adc2
Merge pull request #232 from liffiton/patch-1
pgbovine Aug 9, 2018
9119be4
added liffiton acknowledgment and compiled his changes
pgbovine Aug 9, 2018
9d6ddfd
no survey when requesting help
pgbovine Aug 9, 2018
d4f94d3
compiled
pgbovine Aug 9, 2018
5372e47
added a warning about non-python code not working right now
pgbovine Aug 13, 2018
1484b71
added small note
pgbovine Aug 13, 2018
6581521
added some dependencies
pgbovine Aug 13, 2018
8112a2c
ok now only C, C++, and Ruby are broken
pgbovine Aug 13, 2018
aa7b4b1
Merge branch 'master' of github.com:pgbovine/OnlinePythonTutor
pgbovine Aug 13, 2018
3b685b8
yay c/c++/ruby no longer broken
pgbovine Aug 19, 2018
d5a8db6
added error message for https execution of non-python code
pgbovine Aug 19, 2018
f8575db
added a second backup server for cokapi
pgbovine Aug 28, 2018
f8e380c
minor cosmetic update
pgbovine Sep 12, 2018
1439b6e
Update unsupported-features.md
pgbovine Dec 12, 2018
1cd3ce6
update numbers
pgbovine Jan 8, 2019
a209fda
Merge branch 'master' of github.com:pgbovine/OnlinePythonTutor
pgbovine Jan 8, 2019
3b2e21e
Update unsupported-features.md
pgbovine Feb 3, 2019
c60b615
Update unsupported-features.md
pgbovine Feb 3, 2019
cc56c70
Update unsupported-features.md
pgbovine Feb 14, 2019
959195a
Update unsupported-features.md
pgbovine Mar 24, 2019
1d1de71
shut down chat due to server problems and other technical issues
pgbovine Mar 24, 2019
8f08623
build
pgbovine Mar 24, 2019
e85038b
Update unsupported-features.md
pgbovine Mar 24, 2019
8fef50a
added more official live chat mode shut down message due to technical…
pgbovine Mar 24, 2019
c704386
Update unsupported-features.md
pgbovine Mar 24, 2019
a0a81c3
Update index.html
pgbovine Mar 25, 2019
46d82b2
Update unsupported-features.md
pgbovine Mar 26, 2019
9956bd4
revived live chat and other tweaks
pgbovine Mar 26, 2019
76cdc9c
build
pgbovine Mar 26, 2019
18c7f9b
tweaked wording
pgbovine Mar 26, 2019
8963608
build
pgbovine Mar 26, 2019
c6b858f
always enforce kickban via IP address
pgbovine Mar 26, 2019
266b786
typo fix
pgbovine Mar 26, 2019
36d380b
bugfix
pgbovine Mar 26, 2019
6a89159
removed small in-situ survey
pgbovine Mar 26, 2019
75a5bcd
build
pgbovine Mar 26, 2019
0b3ca74
adjusted error messages
pgbovine Mar 27, 2019
d75badd
build
pgbovine Mar 27, 2019
cf6d440
minor revert of opt-shared-sessions.ts
pgbovine Mar 27, 2019
45f87e3
Update unsupported-features.md
pgbovine Mar 31, 2019
feefbd9
added more serious warnings about server load
pgbovine Apr 2, 2019
d0c544a
build
pgbovine Apr 2, 2019
fd2ba25
Update unsupported-features.md
pgbovine Apr 6, 2019
d81ca0e
disabled shared sessions in opt-live due to server resource limitations
pgbovine Apr 10, 2019
0a7d3eb
compiled
pgbovine Apr 10, 2019
ebf2081
Merge branch 'master' of github.com:pgbovine/OnlinePythonTutor
pgbovine Apr 10, 2019
d921bc1
removed goo.gl url shortener since that service has shut down
pgbovine Apr 10, 2019
1c60f3e
compiled
pgbovine Apr 10, 2019
a87fe1b
Update unsupported-features.md
pgbovine Apr 10, 2019
9050195
Update unsupported-features.md
pgbovine Apr 10, 2019
3a65070
Update unsupported-features.md
pgbovine Apr 10, 2019
9adfca5
Update unsupported-features.md
pgbovine Apr 10, 2019
7c454d6
Update unsupported-features.md
pgbovine Apr 10, 2019
06a697e
Update history.txt
pgbovine Apr 10, 2019
23b40d8
Update history.txt
pgbovine Apr 10, 2019
563d410
Update unsupported-features.md
pgbovine Apr 14, 2019
dcc3bff
zip up togetherjs log files after each one is filled
pgbovine Jun 10, 2019
e0655fb
tiny error check
pgbovine Jun 10, 2019
e0a64e5
better error message for if you're possibly behind a firewall
pgbovine Jun 21, 2019
80ac1ac
compiled
pgbovine Jun 21, 2019
1f1932a
Update unsupported-features.md
pgbovine Jul 26, 2019
69e5d5d
minor index.html tweak and added .htaccess
pgbovine Aug 16, 2019
3f88144
updated chat messages
pgbovine Aug 26, 2019
110dd6f
compiled
pgbovine Aug 26, 2019
5e38ea2
Update unsupported-features.md
pgbovine Oct 3, 2019
2948836
Update unsupported-features.md
pgbovine Oct 10, 2019
e7aa3ae
Update unsupported-features.md
pgbovine Oct 10, 2019
0576033
Update unsupported-features.md
pgbovine Oct 10, 2019
e716461
Update unsupported-features.md
pgbovine Oct 10, 2019
aa6284f
Update unsupported-features.md
pgbovine Oct 10, 2019
f63b58a
Update unsupported-features.md
pgbovine Oct 11, 2019
15e8acd
Update unsupported-features.md
pgbovine Oct 11, 2019
5187994
Update unsupported-features.md
pgbovine Oct 11, 2019
ce19ffd
Update unsupported-features.md
pgbovine Oct 11, 2019
ed58ea5
Update unsupported-features.md
pgbovine Oct 11, 2019
76b6cc6
Update unsupported-features.md
pgbovine Oct 11, 2019
ae5f3ae
Update unsupported-features.md
pgbovine Oct 12, 2019
e24240d
Update unsupported-features.md
pgbovine Oct 12, 2019
1d36d8f
Update README.md
pgbovine Oct 12, 2019
6993b7e
Update history.txt
pgbovine Oct 16, 2019
055334a
Update unsupported-features.md
pgbovine Oct 16, 2019
f2c787a
Update unsupported-features.md
pgbovine Oct 16, 2019
93be6a0
added
pgbovine Oct 19, 2019
8907603
Update unsupported-features.md
pgbovine Oct 19, 2019
099dbc0
Update unsupported-features.md
pgbovine Oct 19, 2019
279cf7f
Update unsupported-features.md
pgbovine Oct 19, 2019
0563b26
Update unsupported-features.md
pgbovine Oct 19, 2019
f497114
updated
pgbovine Oct 19, 2019
9cd168e
simplified the UI by removing excess text and also
pgbovine Oct 19, 2019
f1ca170
compiled
pgbovine Oct 19, 2019
fc33389
Update unsupported-features.md
pgbovine Oct 19, 2019
83e15eb
Update unsupported-features.md
pgbovine Oct 19, 2019
daa37d3
Update unsupported-features.md
pgbovine Oct 19, 2019
778cd8b
Update unsupported-features.md
pgbovine Oct 19, 2019
a209d2e
Update unsupported-features.md
pgbovine Oct 19, 2019
06cd914
Update unsupported-features.md
pgbovine Oct 19, 2019
9b73698
Update unsupported-features.md
pgbovine Oct 19, 2019
2bf0451
got rid of eureka surveys in live mode, and also cleaned up footer a …
pgbovine Oct 19, 2019
3379748
compiled
pgbovine Oct 19, 2019
4c580ef
cleaned up UI a bit more and moved "Step N of M"
pgbovine Oct 20, 2019
0c2ecf9
compiled
pgbovine Oct 20, 2019
27dc702
Create wishlist.md
pgbovine Oct 20, 2019
1a73c02
Update wishlist.md
pgbovine Oct 20, 2019
3bfa2db
Update wishlist.md
pgbovine Oct 20, 2019
e86ce9d
Update wishlist.md
pgbovine Oct 20, 2019
779be0c
Update wishlist.md
pgbovine Oct 20, 2019
cf53d52
Update wishlist.md
pgbovine Oct 20, 2019
2026119
Update wishlist.md
pgbovine Oct 20, 2019
2dd9cd6
Update wishlist.md
pgbovine Oct 20, 2019
1deac7e
Update wishlist.md
pgbovine Oct 20, 2019
c842ba6
Update wishlist.md
pgbovine Oct 20, 2019
33ff7f5
Update wishlist.md
pgbovine Oct 20, 2019
c1d1671
Update wishlist.md
pgbovine Oct 20, 2019
7cf6bb1
Update wishlist.md
pgbovine Oct 20, 2019
98caacb
Update wishlist.md
pgbovine Oct 20, 2019
c9d5b5e
Update wishlist.md
pgbovine Oct 20, 2019
f6e3096
Update wishlist.md
pgbovine Oct 20, 2019
68367e6
Update wishlist.md
pgbovine Oct 20, 2019
a5b2300
Update wishlist.md
pgbovine Oct 21, 2019
dd9f97f
Update wishlist.md
pgbovine Oct 21, 2019
eb220d7
Update wishlist.md
pgbovine Oct 21, 2019
6fd8695
Update unsupported-features.md
pgbovine Oct 21, 2019
3782eb1
Update wishlist.md
pgbovine Oct 21, 2019
4a0aa2d
Update wishlist.md
pgbovine Oct 21, 2019
8259e3b
Update wishlist.md
pgbovine Oct 21, 2019
4a638c0
Update wishlist.md
pgbovine Oct 21, 2019
f05a4c1
Update unsupported-features.md
pgbovine Oct 21, 2019
7b200f7
Update wishlist.md
pgbovine Oct 21, 2019
51084bc
bah
pgbovine Oct 21, 2019
9d01d69
sterner error message
pgbovine Oct 21, 2019
a36ff22
minor updates due to new versions of dependecies
diogo55 Apr 30, 2020
1c27993
graph page
diogo55 May 11, 2020
e1cec51
keep v5 start v6
diogo55 May 11, 2020
2552920
responses to request
diogo55 May 12, 2020
64fba23
graph visualizer updated
diogo55 May 12, 2020
eae5eec
delete file after used
diogo55 May 12, 2020
247d8f3
igraph to pygraphviz
diogo55 May 19, 2020
da59b6c
add route for graphs
diogo55 May 19, 2020
43388dc
graphs are apearing n frontend
diogo55 May 19, 2020
eddd415
update
diogo55 May 22, 2020
ee4663b
add visitReturn_stmt
diogo55 May 22, 2020
6d18482
break and continue cases
diogo55 May 22, 2020
1a9a919
upgrade DFG with loop clusters
diogo55 May 26, 2020
33ce8c2
minor updates
diogo55 Jun 4, 2020
3c434e3
update on subgraphs of DFG
diogo55 Jul 7, 2020
a5da043
create img, display and delete it
diogo55 Jul 10, 2020
c51f23f
update visualization of graphs
diogo55 Jul 14, 2020
e2fac3a
add info about the graphs
diogo55 Jul 29, 2020
6398e07
removed an ambiguity od DFG
diogo55 Sep 21, 2020
9606a78
correct return case on CFG
diogo55 Sep 30, 2020
ba6d9e8
add colors to edge on CFG
diogo55 Oct 5, 2020
261ca26
change arrow type of false FCG
diogo55 Oct 5, 2020
0d7e52a
taking care of multiple initialization
diogo55 Oct 5, 2020
bc95044
just graphs
diogo55 Apr 27, 2021
ba293f2
removed prints
diogo55 Apr 27, 2021
4c9c89c
images to img/
diogo55 Apr 28, 2021
f6f146d
Revert "just graphs"
diogo55 Apr 28, 2021
216253a
just graphs
diogo55 Apr 28, 2021
a7120a4
just graphs
diogo55 May 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix #229 - remove unprotected localStorage access.
Moves the Safari private browsing workaround check into supports_html5_storage().
  • Loading branch information
liffiton authored Jul 24, 2018
commit 70bfcf16d3c8928837ffe23c942a522c15ed7753
31 changes: 13 additions & 18 deletions v5-unity/js/opt-frontend-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,6 @@ export abstract class AbstractBaseFrontend {
abstract handleUncaughtException(trace: any[]) : any; // called by executeCodeAndCreateViz

constructor(params: any = {}) {
// OMG nasty wtf?!?
// From: http://stackoverflow.com/questions/21159301/quotaexceedederror-dom-exception-22-an-attempt-was-made-to-add-something-to-st
// Safari, in Private Browsing Mode, looks like it supports localStorage but all calls to setItem
// throw QuotaExceededError. We're going to detect this and just silently drop any calls to setItem
// to avoid the entire page breaking, without having to do a check at each usage of Storage.
if (typeof localStorage === 'object') {
try {
localStorage.setItem('localStorage', '1');
localStorage.removeItem('localStorage');
} catch (e) {
(Storage as any).prototype._setItem = Storage.prototype.setItem;
Storage.prototype.setItem = function() {}; // make it a NOP
alert('Your web browser does not support storing settings locally. In Safari, the most common cause of this is using "Private Browsing Mode". Some features may not work properly for you.');
}
}

if (supports_html5_storage()) {
// generate a unique UUID per "user" (as indicated by a single browser
// instance on a user's machine, which can be more precise than IP
Expand Down Expand Up @@ -716,10 +700,21 @@ export function generateUUID(){
return uuid;
};

// From http://diveintohtml5.info/storage.html
// Adapted from http://diveintohtml5.info/storage.html
export function supports_html5_storage() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
if ('localStorage' in window && window['localStorage'] !== null) {
// From: http://stackoverflow.com/questions/21159301/
// Safari before v11, in Private Browsing Mode, looks like it supports localStorage but all calls to
// setItem throw QuotaExceededError. Making these calls in the try block will detect that situation
// with the catch below, returning false.
localStorage.setItem('_localStorage_test', '1');
localStorage.removeItem('_localStorage_test');
return true;
}
else {
return false;
}
} catch (e) {
return false;
}
Expand Down