Start of project

This commit is contained in:
benjaminramey
2019-11-09 21:30:27 -06:00
commit 708eed82e5
15 changed files with 9443 additions and 0 deletions

16
src/background.js Normal file
View 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

Binary file not shown.

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

19
src/manifest.json Normal file
View 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
View 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
View 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
View 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)
})