File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ <h3 class="text-center">Free, From Now Until Forever!</h3>
1313 If you cannot do so or just don't want to, it's all good :) Just enjoy the application and keep coding! Thank
1414 you!
1515 </ p >
16+ < p class ="text-center ">
17+ < a href ="# "
18+ class ="disable-rate "> Please don't ask me again</ a > .
19+ </ p >
1620 < p class ="text-center "> </ p >
1721 < p class ="text-center ">
1822 < a href ="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ARY8RPNC934Y2&source=url "
Original file line number Diff line number Diff line change @@ -85,6 +85,13 @@ $(document).ready(function () {
8585 }
8686 } ) ;
8787
88+ $ ( document ) . on ( 'click' , '.disable-rate' , function ( e ) {
89+ let obj = { } ;
90+ obj [ Notifications . disableRateKey ] = true ;
91+ chrome . storage . local . set ( obj ) ;
92+ $ ( e . currentTarget ) . closest ( '.modal' ) . find ( '[data-dismiss="modal"]' ) . trigger ( 'click' ) ;
93+ } ) ;
94+
8895 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
8996
9097
@@ -192,8 +199,7 @@ $(document).ready(function () {
192199 e . idx = idx ;
193200 callback ( fileEntry ) ;
194201 } ) ;
195- }
196- else {
202+ } else {
197203 callback ( fileEntry ) ;
198204 }
199205 } ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ let NotificationsHandler = function () {
55
66 this . versionKey = 'last_notified_version' ;
77 this . requestRateKey = 'rate_requested' ;
8+ this . disableRateKey = 'rate_disabled' ;
89
910 this . init = function ( ) {
1011
@@ -68,9 +69,15 @@ let NotificationsHandler = function () {
6869 } ) ;
6970 } , 3000 ) ;
7071
71- window . setTimeout ( function ( ) {
72- $ ( document ) . find ( '[data-toggle="modal"].modal-content-rate' ) . trigger ( 'click' ) ;
73- } , 5000 ) ;
72+
73+ chrome . storage . local . get ( that . disableRateKey , function ( requested ) {
74+ requested = requested [ that . disableRateKey ] || false ;
75+ if ( ! requested ) {
76+ window . setTimeout ( function ( ) {
77+ $ ( document ) . find ( '[data-toggle="modal"].modal-content-rate' ) . trigger ( 'click' ) ;
78+ } , 5000 ) ;
79+ }
80+ } ) ;
7481
7582 chrome . notifications . onButtonClicked . addListener ( function ( notificationId ) {
7683 if ( notificationId === that . ratingReminderId ) {
You can’t perform that action at this time.
0 commit comments