微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Chrome 扩展帮助,chrome.storage

如何解决Chrome 扩展帮助,chrome.storage

我需要为 chrome 扩展程序创建一个身份验证系统。我需要知道如何仅在用户第一次打开密钥验证弹出窗口时才显示它,但是如果他第二次打开它,它仍然会向他显示该弹出窗口。所以基本上他只有通过身份验证才能访问扩展。我也需要知道如何将用户提供的输入存储在 chrome 扩展输入字段中并在我的脚本中使用它们。我需要知道的最后一件事是在用户通过身份验证后如何将用户重定向到另一个扩展选项卡。对于存储过程,我想收到一个适合我的代码代码,而不是 chrome storage api 的链接,因为我已经尝试使用它但它从未奏效。这是我的代码: HTML:

<html>
    <head>
        <style>
            body {
                width: 400px;
                height: 300px;
            }
        </style>
        <style>
     
            .testo {
                text-align: center;
                font-size: 25px;
                color: rgb(77,162,211);
            }
            
            
            
            .image {
                width: 50px;
                height: 50px;
                text-align: center;
            }
            
            .rounded-input {
                position: absolute;
                color: rgb(77,211);
                bottom: 126px;
                left: 20px;
                right: 20px;
                width: 77%;
                padding: 20px;
                border-radius: 30px;
                border-color: rgb(77,211);
                background-color: rgb(17,13,13);
                font-size: 20px;
                text-align: center;
            }
            
            .btn {
                padding: 15px;
                border-color: rgb(77,211);
                background-color: rgb(39,33,33);
                color: rgb(77,211);
                border-radius: 15px;
                width: 40%;
                position: absolute;
                right: 10%;
                left: 30%;
                bottom: 37px;
                font-family: 'Courier New',Courier,monospace;
                font-size: 14px;
            }

            .twlogo {
                position: absolute;
                bottom: 7px;
                width: 30px;
                height: 20px;
            }


        </style>
    </head>
    <body style="background-color: black;">
        <img src="logoVERO.png" class="image" alt="logo">
        <h1 class="testo">Enter your key:</h1>
        <p><input type="text" class="rounded-input" id="key"></input></p>
    </style>
        <p><button class="btn" id="save">AUTHENTICATE</button></p>
        <a href="https://twitter.com/home">
    <img src="tw.png" class="twlogo">
</a>
    </body>

<script src="./background.js"></script>
</html>```

**Another thing that i want to kNow is how can i let the user pass the auth only if the key he entered is present in an array with all the keys**

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?