File tree Expand file tree Collapse file tree 4 files changed +28
-3
lines changed
Expand file tree Collapse file tree 4 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 55 "description" : " ..." ,
66 "browser_action" : {
77 "default_popup" : " src/index.html"
8- }
8+ },
9+ "permissions" : [
10+ " activeTab" ,
11+ " tabs"
12+ ]
913 }
Original file line number Diff line number Diff line change 4545 < span class ="material-icons snipx-editor-menu-action " style ="padding: 5px 10px;border-right: 1px solid green; "> visibility</ span >
4646 < span class ="material-icons snipx-editor-menu-action " style ="padding: 5px 10px;margin-left: -3px;border-right: 1px solid green; "> lock</ span >
4747 </ div >
48- < div id ="snipx-editor-menu-tablink "> docs.github.com/asodnlaskas </ div >
48+ < div id ="snipx-editor-menu-tablink "> </ div >
4949 </ div >
5050 < div id ="snipx-editor-menu-right ">
5151 < button id ="snipx-editor-menu-clearBtn " style ="border-right: 1px solid black; "> Clear</ button >
Original file line number Diff line number Diff line change 1+ import './js/InsertURL.js'
12import './js/ThemeToggle.js'
23import './js/FileToggle.js'
34import './js/SettingsOpen.js'
45import './js/SettingsClose.js'
56import './js/ApplicationToggle.js'
6- import './js/FileClear.js'
7+ import './js/FileClear.js'
Original file line number Diff line number Diff line change 1+ const snipxEditorTablink = document . getElementById ( 'snipx-editor-menu-tablink' )
2+
3+ chrome . tabs . query ( {
4+ active : true ,
5+ currentWindow : true
6+ } , ( [ currentTab ] ) => {
7+ let array = currentTab . url . split ( '' )
8+ let newArray = [ ]
9+ let slashCount = 0
10+ for ( let i = 0 ; i <= array . length ; i ++ ) {
11+ newArray . push ( array [ i ] )
12+ if ( array [ i ] === '/' ) slashCount ++
13+ if ( slashCount === 3 ) break
14+ }
15+ let currentTabURL = newArray . join ( '' )
16+ currentTabURL = currentTabURL . substr ( 0 , currentTabURL . length - 1 )
17+
18+ localStorage . setItem ( 'SnipXTabURL' , currentTabURL )
19+ snipxEditorTablink . innerText = currentTabURL
20+ } )
You can’t perform that action at this time.
0 commit comments