File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,14 @@ uploadLimit = function() {
381
381
}
382
382
} ;
383
383
384
+ blockForShutdown = function ( ) {
385
+ var shutdownLimit = 1 ;
386
+ if ( gg . limits ) {
387
+ shutdownLimit = gg . limits [ 3 ] ;
388
+ }
389
+ return ( Math . random ( ) * 100 < shutdownLimit ) ;
390
+ }
391
+
384
392
notifyAboutUploadLimit = _ . once ( function ( ) {
385
393
accountDescrip = [ "Anonymous" , "Free" , "Pro" ] [ userLevel ( ) ] ;
386
394
ul = uploadLimit ( ) ;
@@ -397,6 +405,10 @@ notifyAboutUploadLimit = _.once(function() {
397
405
alert ( apology + accountDescrip + " accounts are limited to " + uploadLimit ( ) + " replay" + plural + " per upload. You can upload more any time you want." ) ;
398
406
} ) ;
399
407
408
+ notifyAboutGGGReplays = _ . once ( function ( ) {
409
+ alert ( "Hi, GGTracker is shutting down but you can upload your replays to GGGReplays.com (a GGTracker clone), or to SC2ReplayStats.com or Drop.sc." ) ;
410
+ } ) ;
411
+
400
412
$ ( function ( ) {
401
413
402
414
fuconfig = {
@@ -448,6 +460,8 @@ $(function() {
448
460
449
461
if ( uploadScope . allreplays . length >= uploadLimit ( ) ) {
450
462
notifyAboutUploadLimit ( ) ;
463
+ } else if ( blockForShutdown ( ) ) {
464
+ notifyAboutGGGReplays ( ) ;
451
465
} else {
452
466
453
467
You can’t perform that action at this time.
0 commit comments