@@ -18,7 +18,8 @@ var meta = {
1818 VERSION : '2.1.0' ,
1919 SOURCE_URL : 'https://github.com/DragonOfMath/fa-blacklist' ,
2020 ROOT : 'https://raw.githubusercontent.com/DragonOfMath/fa-blacklist/master/' ,
21- ICON_HREF : 'webext/static/fabl-32.png' ,
21+ ICON32_HREF : 'webext/static/fabl-32.png' ,
22+ ICON128_HREF : 'webext/static/fabl-128.png' ,
2223 LOCALES_HREF : 'webext/_locales/index.json' ,
2324 STYLES_HREF : 'userscript/styles.css'
2425} ;
@@ -886,15 +887,9 @@ function convertCheckboxesToSwitches(type, $root) {
886887
887888// tab controls
888889function $TabControl ( tabs ) {
889- var $tabs = html ( 'div' , {
890- id : 'tabs'
891- } ) ;
892- var $contents = html ( 'div' , {
893- id : 'tabs-contents'
894- } ) ;
895- var $container = html ( 'div' , {
896- id : 'tabs-container'
897- } , [ $tabs , $contents ] ) ;
890+ var $tabs = html ( 'div' , { class : 'tabs' } ) ;
891+ var $contents = html ( 'div' , { class : 'tabs-contents' } ) ;
892+ var $container = html ( 'div' , { class : 'tabs-container' } , [ $tabs , $contents ] ) ;
898893
899894 $container . $active = null ;
900895
@@ -973,10 +968,10 @@ function $Window(props) {
973968 DragHandler . stop ( ) ;
974969 if ( props . canHide ) {
975970 $window . hide ( ) ;
976- $window . dispatchEvent ( { target : $window , name : 'hide' } ) ;
971+ // $window.dispatchEvent({target: $window, name: 'hide'});
977972 } else {
978973 $window . remove ( ) ;
979- $window . dispatchEvent ( { target : $window , name : 'close' } ) ;
974+ // $window.dispatchEvent({target: $window, name: 'close'});
980975 }
981976 } ) ;
982977
@@ -1235,7 +1230,7 @@ var i18n = {
12351230 i18nData . split ( ';' ) . forEach ( function ( attr ) {
12361231 if ( ! attr ) return ;
12371232 var data = attr . split ( ',' ) ;
1238- var message = this . get ( data [ 0 ] ) ;
1233+ var message = i18n . get ( data [ 0 ] ) ;
12391234 if ( message ) {
12401235 if ( data [ 1 ] ) {
12411236 $node . setAttribute ( data [ 1 ] , message ) ;
@@ -2032,7 +2027,7 @@ function scrape() {
20322027 submission . addNode ( $submissionImg , 'thumbnail' , true ) ;
20332028 submission . addNode ( $submissionTags , 'link' ) ;
20342029
2035- var $submissionOwner = body . select ( 'div.classic-submission-title>' + USER_LINK , 'div.submission-title>span>a' ) [ 0 ] ;
2030+ var $submissionOwner = body . select ( 'div.submission-id-container>' + USER_LINK , 'div. classic-submission-title>' + USER_LINK , 'div.submission-title>span>a' ) [ 0 ] ;
20362031 profileName = resolveUsername ( $submissionOwner ) ;
20372032 profileUser = users [ profileName ] ;
20382033 profileUser . addSubmission ( submission ) ;
@@ -3280,11 +3275,11 @@ var App = {
32803275 } ,
32813276 init : function ( ) {
32823277 Notification . requestPermission ( ) ;
3283- Page . init ( ) ;
3284- List . init ( ) ;
32853278 i18n . init ( )
3286- . then ( App . load )
3287- . then ( App . inject ) ;
3279+ . then ( Page . init )
3280+ . then ( List . init )
3281+ . then ( App . inject )
3282+ . then ( App . load ) ;
32883283 } ,
32893284 update : function ( ) {
32903285 OptionsForm . update ( ) ;
@@ -3294,7 +3289,7 @@ var App = {
32943289 } ,
32953290 applyLocalization : function ( ) {
32963291 i18n . locale = Options . locale in i18n . _locales ? Options . locale : i18n . DEFAULT_LOCALE ;
3297- if ( App . $elem ) i18n . localizeDocument ( App . $elem ) ;
3292+ if ( App . $mainWindow ) i18n . localizeDocument ( App . $mainWindow ) ;
32983293 } ,
32993294 inject : function ( ) {
33003295 // insert a button into the webpage nav container
@@ -3345,7 +3340,7 @@ var App = {
33453340 createMainWindow : function ( ) {
33463341 App . $mainWindow = $Window ( {
33473342 title : i18n . get ( 'extensionNameShort' ) + ' ' + meta . VERSION ,
3348- icon : ( new URL ( meta . ICON_URL , meta . ROOT ) ) . href ,
3343+ icon : ( new URL ( meta . ICON32_HREF , meta . ROOT ) ) . href ,
33493344 body : $TabControl ( {
33503345 'page' : {
33513346 'tab' : html ( 'span' , { 'data-i18n' : 'pageContentsTitle' } ) ,
@@ -3372,11 +3367,9 @@ var App = {
33723367 return App . $mainWindow ;
33733368 } ,
33743369 _reloadStylesheet : function ( ) {
3375- console . log ( 'Fetching stylesheet' ) ;
33763370 return fetch ( ( new URL ( meta . STYLES_HREF , meta . ROOT ) ) . href )
33773371 . then ( function ( x ) { return x . text ( ) } )
33783372 . then ( function ( stylesheet ) {
3379- console . log ( 'Reloaded stylesheet:' , stylesheet ) ;
33803373 App . $stylesheet . innerHTML = stylesheet ;
33813374 return GM . setValue ( 'bl_stylesheet' , JSON . stringify ( {
33823375 _version : meta . VERSION ,
0 commit comments