File tree 3 files changed +22
-5
lines changed
3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ <h3 class="text-center">Free, From Now Until Forever!</h3>
13
13
If you cannot do so or just don't want to, it's all good :) Just enjoy the application and keep coding! Thank
14
14
you!
15
15
</ p >
16
+ < p class ="text-center ">
17
+ < a href ="# "
18
+ class ="disable-rate "> Please don't ask me again</ a > .
19
+ </ p >
16
20
< p class ="text-center "> </ p >
17
21
< p class ="text-center ">
18
22
< 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 () {
85
85
}
86
86
} ) ;
87
87
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
+
88
95
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
89
96
90
97
@@ -192,8 +199,7 @@ $(document).ready(function () {
192
199
e . idx = idx ;
193
200
callback ( fileEntry ) ;
194
201
} ) ;
195
- }
196
- else {
202
+ } else {
197
203
callback ( fileEntry ) ;
198
204
}
199
205
} ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ let NotificationsHandler = function () {
5
5
6
6
this . versionKey = 'last_notified_version' ;
7
7
this . requestRateKey = 'rate_requested' ;
8
+ this . disableRateKey = 'rate_disabled' ;
8
9
9
10
this . init = function ( ) {
10
11
@@ -68,9 +69,15 @@ let NotificationsHandler = function () {
68
69
} ) ;
69
70
} , 3000 ) ;
70
71
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
+ } ) ;
74
81
75
82
chrome . notifications . onButtonClicked . addListener ( function ( notificationId ) {
76
83
if ( notificationId === that . ratingReminderId ) {
You can’t perform that action at this time.
0 commit comments