File tree Expand file tree Collapse file tree 3 files changed +3
-18
lines changed Expand file tree Collapse file tree 3 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ chrome.webNavigation.onHistoryStateUpdated.addListener(function(details) {
66
77 // Setup page for layout changes and show page action
88 if ( match ) {
9+ chrome . tabs . insertCSS ( null , {
10+ file : 'css/layout.css'
11+ } ) ;
912 chrome . tabs . executeScript ( null , {
1013 file : 'js/init.js'
1114 } ) ;
Original file line number Diff line number Diff line change 1- function insertCss ( ) {
2- const cssFile = chrome . extension . getURL ( 'css/layout.css' ) ;
3- const cssId = 'layoutcss' ;
4-
5- if ( document . getElementById ( cssId ) === null ) {
6- let css = document . createElement ( 'link' ) ;
7- css . id = cssId ;
8- css . type = 'text/css' ;
9- css . rel = 'stylesheet' ;
10- css . href = cssFile ;
11- document . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( css ) ;
12- }
13- }
14-
151function syncState ( ) {
162 chrome . storage . sync . get ( 'classList' , function ( result ) {
173 let board = document . getElementById ( 'board' ) ;
@@ -45,5 +31,4 @@ function toggleLayout() {
4531 }
4632}
4733
48- insertCss ( ) ;
4934syncState ( ) ;
Original file line number Diff line number Diff line change 1919 " storage" ,
2020 " webNavigation"
2121 ],
22- "web_accessible_resources" : [
23- " css/layout.css"
24- ],
2522 "page_action" : {
2623 "default_title" : " List Layouts for Trello"
2724 },
You can’t perform that action at this time.
0 commit comments