Niv Sardi commited on
Commit
05802f8
·
0 Parent(s):

Signed-off-by: Niv Sardi <[email protected]>

Files changed (4) hide show
  1. .gitattributes +1 -0
  2. detect.js +23 -0
  3. icons/48.png +3 -0
  4. manifest.json +15 -0
.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ *.png filter=lfs diff=lfs merge=lfs -text
detect.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Set up a mutation observer to listen for title changes
2
+ // Will fire if framework AJAX stuff switches page title
3
+ let createObserver = function() {
4
+ let observer = new MutationObserver((mutations) => {
5
+ // Disconnect the MO so there isn't an infinite title update loop
6
+ // Run title cleanup again
7
+ // Create a new MO to listen for more changes
8
+ console.log('Mutations!', mutations)
9
+ observer.disconnect()
10
+ observer = null
11
+ cleanup()
12
+ createObserver()
13
+ })
14
+
15
+ observer.observe(
16
+ document.querySelector('input'),
17
+ { subtree: true, characterData: true, childList: true }
18
+ )
19
+ }
20
+ createObserver()
21
+
22
+ // Kick off initial page load check
23
+ cleanup()
icons/48.png ADDED

Git LFS Details

  • SHA256: 825d5852ba7b2b0822cab6e2aca3a9d26b0c8cbbc5343a861041e7f70d823095
  • Pointer size: 128 Bytes
  • Size of remote file: 866 Bytes
manifest.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "manifest_version": 2,
3
+ "name": "Spoof detect",
4
+ "version": "0.1",
5
+ "icons": {
6
+ "48": "icons/48.png"
7
+ },
8
+ "description": "Try to detect website spoofing",
9
+ "content_scripts": [
10
+ {
11
+ "matches": ["<all_urls>"],
12
+ "js": ["detect.js"]
13
+ }
14
+ ]
15
+ }