Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

var api_key_awaited gets defined twice #33

Open
gamedeviced opened this issue Apr 27, 2021 · 0 comments
Open

var api_key_awaited gets defined twice #33

gamedeviced opened this issue Apr 27, 2021 · 0 comments

Comments

@gamedeviced
Copy link

    var NO_API_KEY = false;
    var api_key_awaited = await GM.getValue("api_key");  // HERE
    if(api_key_awaited === undefined || api_key_awaited === null || api_key_awaited === ""){
        await GM.setValue("api_key", prompt("Enter your API key. Go to https://developers.google.com/youtube/v3/getting-started to know how to obtain an API key, then go to https://console.developers.google.com/apis/api/youtube.googleapis.com/ in order to enable Youtube Data API for your key."));
    }
  
    var api_key_awaited = await GM.getValue("api_key");  // AND HERE
    if(api_key_awaited === undefined || api_key_awaited === null || api_key_awaited === ""){
        NO_API_KEY = true; // Resets after page reload, still allows local title to be replaced
        console.log("NO API KEY PRESENT");
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant