Skip to content

Commit 2dcf1c5

Browse files
committed
change for firebase and readme file
1 parent a433e47 commit 2dcf1c5

11 files changed

+538
-166
lines changed

background.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset=utf-8 />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
7+
<title>Personal note</title>
8+
9+
<link rel="stylesheet" href="main.css">
10+
<script src="https://www.gstatic.com/firebasejs/5.9.3/firebase.js"></script>
11+
<script src="scripts/background.js"></script>
12+
</head>
13+
<body>
14+
15+
</body>
16+
</html>

icons/logo.png

822 Bytes
Loading

icons/note-screenshot.png

11.3 KB
Loading

manifest.json

+18-19
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
{
2+
"manifest_version": 2,
23
"name": "Personal Note",
3-
"description": "we can save simple note.",
4+
"description": "its simple to save note.",
45
"version": "1.0",
5-
"author": "Ramesh Vaniya",
6-
76
"icons": {
87
"64": "icons/icon64x64.png"
9-
},
8+
},
109
"browser_action": {
11-
"default_title": "Personal Note",
12-
"default_icon": {
13-
"64": "icons/icon64x64.png"
14-
},
15-
"default_popup": "option.html"
10+
"default_icon": "icons/icon64x64.png",
11+
"default_popup": "popup.html"
12+
},
13+
"background": {
14+
"page": "background.html"
1615
},
17-
"content_scripts": [
18-
{
19-
"matches": ["<all_urls>"],
20-
"css": ["styles/style.css"],
21-
"run_at": "document_start"
22-
}
23-
],
2416
"permissions": [
25-
"activeTab",
26-
"storage"
17+
"identity"
2718
],
28-
"manifest_version": 2
19+
"content_security_policy":"script-src 'self' https://www.gstatic.com/ https://*.firebaseio.com https://www.googleapis.com; object-src 'self'",
20+
"oauth2": {
21+
"client_id": "client_id.apps.googleusercontent.com",
22+
"scopes": [
23+
"https://www.googleapis.com/auth/userinfo.email",
24+
"https://www.googleapis.com/auth/userinfo.profile"
25+
]
26+
},
27+
"key":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmurudj/UbfZLj8AR4mMFJ3kZCCSk87ht39Sad4+Q7/gPcmKmt8QkRBOUTr8eFNPowa1UC7Zlnj4scioyWZYbDo5jaCCIuPO2AQ9We9Q8Ukzn+CLygIMV0g23vUZX/KVWnWSH89hPyABKnnO2OjH8RH3Ww35QnATpI7KaSDuUAAbMnA63B5R9MqZMzgJ2t01jkW6zgCvCIYDBBKNkHUPIbLAuhwBAHR7XiUaGDJ51BGz1Ef7A9u8qCyTUsCaq5V3UaoMiLFaQbyXcL/vNtREuTX/hgNVpbHrwhKSc5vOlOm3v8UyOKTjheXEjiIZ+782sl9baP/cAxAdbIkQKR+w5UwIDAQAB"
2928
}

option.js

-116
This file was deleted.

option.html renamed to popup.html

+18-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@
44
<link href="styles/style.css" rel="stylesheet" />
55
</head>
66
<body>
7-
87
<div class="note-container">
8+
<div class="syn-status">
9+
<div class="left">
10+
<img class="logo" src="icons/logo.png" alt="personal note" />
11+
<span class="title">Personal Note</span>
12+
</div>
13+
<div class="syn-status right"><span id="loginUser">Guest </span><button id="syn-button">Login</button></div>
14+
<div class="clear"></div>
15+
</div>
16+
17+
918
<div class="container">
19+
1020
<form id="note-externsion-form" class="row justify-content-center">
1121
<div class="col-md-12">
1222
<div class="form-group">
13-
<input id="externsion-note-input" type="text" placeholder="Enter note" class="form-control">
23+
<input id="externsion-note-input" type="text" placeholder="Enter Note" class="form-control">
1424
</div>
1525
<div class="color-btn">
1626
<button type="submit" class="button">Save</button>
@@ -20,6 +30,8 @@
2030
</form>
2131
</div>
2232
<div class="container">
33+
<center><div class="lds-ripple note-loader hide"><div></div><div></div></div>
34+
</center>
2335
<div class="row">
2436
<div class="col-md-12">
2537
<div class="note-box clear">
@@ -31,9 +43,9 @@
3143
</div>
3244
</div>
3345
</div>
34-
35-
<script src="scripts/jquery-3.2.1.slim.min.js"></script>
36-
<script src="option.js"></script>
37-
46+
47+
<script src="scripts/jquery-3.2.1.min.js"></script>
48+
<script src="https://www.gstatic.com/firebasejs/5.9.3/firebase.js"></script>
49+
<script src="scripts/popup.js"></script>
3850
</body>
3951
</html>

readme.md

+24-25
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,36 @@ it is easy to create your own extension.We need to required manifest.json file a
1515

1616
you must create manifest.json file in root directory
1717

18-
manifest.json
1918
{
19+
"manifest_version": 2,
2020
"name": "Personal Note",
21-
"description": "we can save simple note.",
21+
"description": "its simple to save note.",
2222
"version": "1.0",
23-
"author": "Ramesh Vaniya",
24-
23+
"auther":"Ramesh Vaniya",
2524
"icons": {
26-
"32": "icons/icon32x32.png"
27-
},
25+
"64": "icons/icon64x64.png"
26+
},
2827
"browser_action": {
29-
"default_title": "Personal Note",
30-
"default_icon": {
31-
"32": "icons/icon32x32.png",
32-
"16": "icons/icon16x16.png",
33-
"12": "icons/icon12x12.png"
34-
},
35-
"default_popup": "option.html"
28+
"default_icon": "icons/icon64x64.png",
29+
"default_popup": "popup.html"
30+
},
31+
"background": {
32+
"page": "background.html"
3633
},
37-
"content_scripts": [
38-
{
39-
"matches": ["<all_urls>"],
40-
"css": ["styles/style.css"],
41-
"js": ["scripts/background.js"],
42-
"run_at": "document_start"
43-
}
44-
],
4534
"permissions": [
46-
"activeTab",
47-
“storage”
35+
"identity"
4836
],
49-
"manifest_version": 2
37+
"content_security_policy":"script-src 'self' https://www.gstatic.com/ https://*.firebaseio.com https://www.googleapis.com; object-src 'self'",
38+
"oauth2": {
39+
"client_id": "client.apps.googleusercontent.com",
40+
"scopes": [
41+
"https://www.googleapis.com/auth/userinfo.email",
42+
"https://www.googleapis.com/auth/userinfo.profile"
43+
]
44+
},
45+
"key":"extension public key"
5046
}
47+
5148
<img src="icons/note-screenshot.png"></p>
5249

5350
## upload extension in your local browser (Google chrome)
@@ -64,9 +61,11 @@ manifest.json
6461
<img src="settings/firefox-setting1.png"></p>
6562

6663
- installed extension
67-
<img src="firefox-setting2.png"></p>
64+
<img src="settings/firefox-setting2.png"></p>
6865

6966
[our extension in firefox store]
7067
(https://addons.mozilla.org/en-US/firefox/addon/personal-note)
7168

69+
<img src="icons/note-screenshot.png"></p>
70+
7271
[You can check full detail about it. you can open our blog](https://github.com/logisticinfotech/laravel-user-role-base-permision-without-any-package).

scripts/background.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Initialize Firebase
2+
var config = {
3+
apiKey: 'AIzaSyD630zazwbURuIPs5AnIgElhuxv82zJ7r4',
4+
databaseURL: 'extension-237511.firebaseapp.com',
5+
storageBucket: 'extension-237511.appspot.com'
6+
};
7+
firebase.initializeApp(config);
8+
9+
function initApp() {
10+
// Listen for auth state changes.
11+
firebase.auth().onAuthStateChanged(function(user) {
12+
console.log('User state change detected from the Background script of the Chrome Extension:', user);
13+
});
14+
}
15+
16+
window.onload = function() {
17+
initApp();
18+
};

scripts/jquery-3.2.1.min.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)