Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
432c8f09ee |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Slop Farmer",
|
||||
"version": "0.3",
|
||||
"version": "0.1",
|
||||
|
||||
"author": "Jack Case",
|
||||
"description": "Crowd-source AI slop pages and domains",
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<title>Slop Farmer</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello, world!</h1>
|
||||
<form id="login-form">
|
||||
<label for="email" id="username">user:</label>
|
||||
<input type="text" name="username" required />
|
||||
@@ -15,5 +16,4 @@
|
||||
<input type="password" name="password" required />
|
||||
<button id="login-button">login</button>
|
||||
</form>
|
||||
<h2 style="visibility: collapse;" id="login-status">You're logged in.</h2>
|
||||
</body>
|
||||
@@ -3,10 +3,6 @@ let access_token
|
||||
|
||||
const login_form = document.getElementById("login-form")
|
||||
if(login_form) {
|
||||
const login_status = document.getElementById("login-status")
|
||||
if (localStorage.getItem("accessToken")) {
|
||||
login_status.setAttribute("style", "visibility: visible;")
|
||||
}
|
||||
login_form.addEventListener("submit", (event) => {event.preventDefault(); submit_login_form()})
|
||||
}
|
||||
|
||||
@@ -152,8 +148,7 @@ async function on_button_clicked_handler(tab) {
|
||||
const domain = tab_url.hostname
|
||||
const path = tab_url.pathname
|
||||
|
||||
await insert_slop(domain, path)
|
||||
update_page_action_icon({frameId: 0, tabId: tab.id, url: tab.url})
|
||||
insert_slop(domain, path)
|
||||
}
|
||||
|
||||
async function update_page_action_icon(details) {
|
||||
@@ -232,8 +227,6 @@ async function submit_login_form() {
|
||||
const body = await response.json()
|
||||
const token = body.access_token
|
||||
localStorage.setItem("accessToken", token)
|
||||
const status_el = document.getElementById("login-status")
|
||||
status_el.setAttribute("style", "visibility: visible;")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user