Skip to content

Commit

Permalink
Merged: csp-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mbnuqw committed Mar 25, 2021
1 parent fab044e commit 3649386
Show file tree
Hide file tree
Showing 10 changed files with 3,877 additions and 5,193 deletions.
6 changes: 2 additions & 4 deletions addon/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"author": "mbnuqw",
"name": "__MSG_ExtName__",
"version": "4.9.0",
"version": "4.9.1",
"default_locale": "en",
"description": "__MSG_ExtDesc__",
"homepage_url": "https://github.com/mbnuqw/sidebery",
Expand Down Expand Up @@ -241,7 +241,5 @@

"background": {
"page": "background.html"
},

"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self';"
}
}
137 changes: 3 additions & 134 deletions addon/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Sidebery / Settings</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="module" src="/vendor/vue.min.js" defer></script>
<script type="module" src="/vendor/vuex.min.js" defer></script>
<script type="module" src="/vendor/vue.js" defer></script>
<script type="module" src="/vendor/vuex.js" defer></script>
<script type="module" src="/globals.js" defer></script>
<link rel="stylesheet" type="text/css" href="../themes/default/settings.css">
<style>
Expand Down Expand Up @@ -93,138 +93,7 @@
<svg id="icon_none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 8a4 4 0 01-6.03 3.45l5.48-5.48c.35.6.55 1.29.55 2.03zm-7.45 2.03l5.48-5.48a4 4 0 00-5.48 5.48zM14 8A6 6 0 112 8a6 6 0 0112 0z"/></svg>
</div>

<div
id="root"
class="root"
:data-style="$store.state.style"
:data-animations="$store.state.animations ? 'fast' : 'none'">

<nav class="nav">
<div>
<div
class="option"
:data-active="$store.state.activeView === 'Settings'"
@click="navigateTo('')">{{t('settings.nav_settings')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_general'"
@click="navigateTo('settings_general')">{{t('settings.nav_settings_general')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_menu'"
@click="navigateTo('settings_menu')">{{t('settings.nav_settings_menu')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_nav'"
@click="navigateTo('settings_nav')">{{t('settings.nav_settings_nav')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_group'"
@click="navigateTo('settings_group')">{{t('settings.nav_settings_group')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_containers'"
@click="navigateTo('settings_containers')">{{t('settings.nav_settings_containers')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_panels'"
@click="navigateTo('settings_panels')">{{t('settings.nav_settings_panels')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_dnd'"
@click="navigateTo('settings_dnd')">{{t('settings.nav_settings_dnd')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_tabs'"
@click="navigateTo('settings_tabs')">{{t('settings.nav_settings_tabs')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_new_tab_position'"
@click="navigateTo('settings_new_tab_position')">{{t('settings.nav_settings_new_tab_position')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_pinned_tabs'"
@click="navigateTo('settings_pinned_tabs')">{{t('settings.nav_settings_pinned_tabs')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_tabs_tree'"
@click="navigateTo('settings_tabs_tree')">{{t('settings.nav_settings_tabs_tree')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_bookmarks'"
@click="navigateTo('settings_bookmarks')">{{t('settings.nav_settings_bookmarks')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_appearance'"
@click="navigateTo('settings_appearance')">{{t('settings.nav_settings_appearance')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_mouse'"
@click="navigateTo('settings_mouse')">{{t('settings.nav_settings_mouse')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_keybindings'"
@click="navigateTo('settings_keybindings')">{{t('settings.nav_settings_keybindings')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_permissions'"
@click="navigateTo('settings_permissions')">{{t('settings.nav_settings_permissions')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_snapshots'"
@click="navigateTo('settings_snapshots')">{{t('settings.nav_settings_snapshots')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_storage'"
@click="navigateTo('settings_storage')">{{t('settings.nav_settings_storage')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_sync'"
@click="navigateTo('settings_sync')">{{t('settings.nav_settings_sync')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'settings_help'"
@click="navigateTo('settings_help')">{{t('settings.nav_settings_help')}}</div>

<div
class="option"
:data-active="$store.state.activeView === 'MenuEditor'"
@click="navigateTo('menu_editor')">{{t('settings.nav_menu')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'menu_editor_tabs'"
@click="navigateTo('menu_editor_tabs')">{{t('settings.nav_menu_tabs')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'menu_editor_tabs_panel'"
@click="navigateTo('menu_editor_tabs_panel')">{{t('settings.nav_menu_tabs_panel')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'menu_editor_bookmarks'"
@click="navigateTo('menu_editor_bookmarks')">{{t('settings.nav_menu_bookmarks')}}</div>
<div
class="sub-option"
:data-active="$store.state.activeSection === 'menu_editor_bookmarks_panel'"
@click="navigateTo('menu_editor_bookmarks_panel')">{{t('settings.nav_menu_bookmarks_panel')}}</div>

<div
class="option"
:data-active="$store.state.activeView === 'StylesEditor'"
@click="navigateTo('styles_editor')">{{t('settings.nav_styles')}}</div>

<div
class="option"
:data-active="$store.state.activeView === 'Snapshots'"
@click="navigateTo('snapshots')">{{t('settings.nav_snapshots')}}</div>
</div>
</nav>

<transition name="settings" mode="out-in">
<keep-alive>
<component :is="$store.state.activeView"></component>
</keep-alive>
</transition>
</div>
<div id="app"></div>

<script src="./settings.js" defer></script>
</body>
Expand Down
19 changes: 3 additions & 16 deletions addon/sidebar/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="../themes/default/sidebar.css" id="theme_link">
<script type="module" src="/vendor/vue.min.js" defer></script>
<script type="module" src="/vendor/vuex.min.js" defer></script>
<script type="module" src="/vendor/vue.js" defer></script>
<script type="module" src="/vendor/vuex.js" defer></script>
<script type="module" src="/globals.js" defer></script>
</head>

Expand Down Expand Up @@ -199,20 +199,7 @@
<svg id="icon_close_other_tabs" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13 0l3 5h-2v1h-2V5h-2l3-5zM.4 4.6L3.8 8 .4 11.4l1.2 1.2L5 9.2l3.4 3.4.6-.6v-1L8 9.7 6.1 8 8 6.3 9 5V4l-.6-.6L5 6.8 1.6 3.4.4 4.6zM15 9V7h-4v2h4zM16 11l-3 5-3-5h2v-1h2v1h2z"/></svg>
</div>

<div
id="root"
class="root"
:data-nav-layout="$store.state.navBarLayout"
:data-native-scrollbar="$store.state.nativeScrollbars"
:data-theme="$store.state.theme"
:data-style="$store.state.style"
:data-animations="animations"
:data-pinned-tabs-position="pinnedTabsPosition"
:data-pinned-tabs-list="$store.state.pinnedTabsList"
:data-tabs-tree-lvl-marks="$store.state.tabsLvlDots"
:data-tabs-close-btn="$store.state.showTabRmBtn">
<sidebar ref="sidebar"></sidebar>
</div>
<div id="app"></div>

<script src="sidebar.js" defer></script>
</body>
Expand Down
8 changes: 4 additions & 4 deletions build/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const fs = require('fs')
const MODE = process.argv[process.argv.length - 1]

if (MODE === 'dev') {
fs.copyFileSync('./node_modules/vue/dist/vue.js', './addon/vendor/vue.min.js')
fs.copyFileSync('./node_modules/vuex/dist/vuex.js', './addon/vendor/vuex.min.js')
fs.copyFileSync('./node_modules/vue/dist/vue.runtime.js', './addon/vendor/vue.js')
fs.copyFileSync('./node_modules/vuex/dist/vuex.js', './addon/vendor/vuex.js')
}

if (MODE === 'build') {
fs.copyFileSync('./node_modules/vue/dist/vue.min.js', './addon/vendor/vue.min.js')
fs.copyFileSync('./node_modules/vuex/dist/vuex.min.js', './addon/vendor/vuex.min.js')
fs.copyFileSync('./node_modules/vue/dist/vue.runtime.min.js', './addon/vendor/vue.js')
fs.copyFileSync('./node_modules/vuex/dist/vuex.min.js', './addon/vendor/vuex.js')
}
Loading

0 comments on commit 3649386

Please sign in to comment.