L
L
Locket2020-01-02 13:40:02
JavaScript
Locket, 2020-01-02 13:40:02

Saving user actions?

I'm creating an extension that changes the background on the page when a button is clicked in the extension's popup. Is it possible to make it so that when you reload the page, you do not have to click on the button again to change the background, that is, save the click?
Here is the code in the manifest:

{
    "manifest_version": 2,
    "name": "Extension",
    "description": "description",
    "version": "1.0",
    "author": "Locket Page",
    "browser_action": {
        "default_title": "title",
        "default_icon": "icon.png",
        "default_popup": "index.html"
    },
    "content_scripts": [
        {
            "matches": ["<all_urls>"],
            "js": ["script.js"],
            "css": ["self_style.css"]
        }
    ],
    "permissions": ["activeTab"]
}

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dollar, 2020-01-02
@Locket

For example, you can save to the localStorage of the site,
or to the localStorage of the background page.

A
Alexander Konovalov, 2017-03-14
@Huf

https://www.myfonts.com/WhatTheFont
Prepare only first and upload

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question