Start of project
This commit is contained in:
16
src/background.js
Normal file
16
src/background.js
Normal file
@@ -0,0 +1,16 @@
|
||||
chrome.runtime.onInstalled.addListener(function() {
|
||||
var data = {
|
||||
apiKey: "the key",
|
||||
groupings: []
|
||||
};
|
||||
|
||||
chrome.storage.sync.set(data, function() {
|
||||
console.log("data initialized");
|
||||
});
|
||||
});
|
||||
|
||||
chrome.browserAction.onClicked.addListener(function() {
|
||||
chrome.tabs.create({
|
||||
url: 'page/groupings.html'
|
||||
});
|
||||
});
|
||||
BIN
src/icons/icon.xcf
Normal file
BIN
src/icons/icon.xcf
Normal file
Binary file not shown.
BIN
src/icons/icon_128.png
Normal file
BIN
src/icons/icon_128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
BIN
src/icons/icon_48.png
Normal file
BIN
src/icons/icon_48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
19
src/manifest.json
Normal file
19
src/manifest.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Pinboard Groupings",
|
||||
"description": "Group Pinboard tags",
|
||||
"version": 1.0,
|
||||
"manifest_version": 2,
|
||||
"icons": {
|
||||
"48": "icons/icon_48.png",
|
||||
"128": "icons/icon_128.png"
|
||||
},
|
||||
"browser_action": {
|
||||
"default_title": "Open Pinboard Groupings page"
|
||||
},
|
||||
"permissions": ["storage", "tabs"],
|
||||
"background": {
|
||||
"scripts": [
|
||||
"background.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
26
src/page/App.vue
Normal file
26
src/page/App.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="fluid-container p-2">
|
||||
<h1>Pinboard Groupings</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
apiKey: "bob",
|
||||
groupings: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
chrome.storage.sync.get(['apiKey', 'groupings'], result => {
|
||||
this.apiKey = result.apiKey;
|
||||
this.groupings = result.groupings;
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
17
src/page/groupings.html
Normal file
17
src/page/groupings.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Pinboard Groupings</title>
|
||||
<link rel="stylesheet" href="groupings.css">
|
||||
<% if (NODE_ENV === 'development') { %>
|
||||
<!-- Load some resources only in development environment -->
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
|
||||
</div>
|
||||
<script src="groupings.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
9
src/page/groupings.js
Normal file
9
src/page/groupings.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
el: '#app',
|
||||
|
||||
render: h => h(App)
|
||||
})
|
||||
Reference in New Issue
Block a user