@@ -4,8 +4,6 @@ angular.module('application', ['cp.ngConfirm'])
44 function ( $ngConfirmDefaults ) {
55 // modify the defaults here.
66 // $ngConfirmDefaults.theme = 'modern';
7-
8-
97 }
108 ] )
119 . controller ( 'quickFeaturesController' , [
@@ -15,6 +13,7 @@ angular.module('application', ['cp.ngConfirm'])
1513 '$ngConfirmDefaults' ,
1614 '$timeout' ,
1715 function ( $scope , $ngConfirm , $interval , $ngConfirmDefaults , $timeout ) {
16+
1817 $scope . materialTheme = function ( ) {
1918 $ngConfirm ( {
2019 title : 'Alert' ,
@@ -1020,6 +1019,50 @@ angular.module('application', ['cp.ngConfirm'])
10201019 } ) ;
10211020 } ;
10221021 }
1022+ ] )
1023+ . controller ( 'adsController' , [
1024+ '$scope' ,
1025+ '$timeout' ,
1026+ '$ngConfirm' ,
1027+ function ( $scope , $timeout , $ngConfirm ) {
1028+ $timeout ( function ( ) {
1029+ if ( typeof google_jobrunner == 'undefined' && ! localStorage [ 'adsok' ] ) {
1030+ $ngConfirm ( {
1031+ title : 'Hmmm, ad blocker' ,
1032+ theme : 'material' ,
1033+ content : "Ads aren't what you're here for. But ads help me support my work. So, please consider to add this domain to your blocker's whitelist." ,
1034+ closeIcon : false ,
1035+ buttons : {
1036+ done : {
1037+ text : 'Did it' ,
1038+ btnClass : 'btn-green' ,
1039+ action : function ( ) {
1040+ $ngConfirm ( 'I really appreciate this. Thank you.' , 'You\'re awesome' ) ;
1041+ $timeout ( function ( ) {
1042+ location . reload ( ) ;
1043+ } , 1000 ) ;
1044+ }
1045+ } ,
1046+ doNotAskAgain : {
1047+ text : 'Don\'t ask' ,
1048+ action : function ( ) {
1049+ localStorage [ 'adsok' ] = true ;
1050+ }
1051+ } ,
1052+ donate : {
1053+ text : 'Donate' ,
1054+ btnClass : 'btn-default' ,
1055+ action : function ( ) {
1056+ window . open ( 'https://www.paypal.me/bonifacepereira' , '_blank' ) ;
1057+ localStorage [ 'adsok' ] = true ;
1058+ }
1059+ }
1060+
1061+ }
1062+ } ) ;
1063+ }
1064+ } , 1000 ) ;
1065+ }
10231066 ] ) ;
10241067
10251068
0 commit comments