Giter Site home page Giter Site logo

code from function-sample-tutorial.quick-api-reference encounters authentication issue with API: Error Code 401 about chrome-extensions-samples HOT 5 CLOSED

ahauser16 avatar ahauser16 commented on May 24, 2024 1
code from function-sample-tutorial.quick-api-reference encounters authentication issue with API: Error Code 401

from chrome-extensions-samples.

Comments (5)

patrickkettner avatar patrickkettner commented on May 24, 2024

Hi @ahauser16!
This is because the documentation website was recently migrated to a new backend system, so the specific selector being used is no longer valid.
As a temporary workaround, you can change the selector on line 4 from .navigation-rail__links to .devsite-tabs-wrapper to see something similar.

from chrome-extensions-samples.

itzmeimran avatar itzmeimran commented on May 24, 2024

Is this issue stil open ???

from chrome-extensions-samples.

4Furki4 avatar 4Furki4 commented on May 24, 2024

quering the dom for the nav as below solved the issue for me. I can see the Tip text on the navbar that opens the popup.

const nav = document.querySelector('.lower-tabs .devsite-tabs-wrapper');
OR
const nav = document.querySelector('.upper-tabs .devsite-tabs-wrapper');

However, I still see the error Uncaught (in promise) TypeError: Cannot read properties of null (reading 'append') that points to the line nav.append(tipWidget);

from chrome-extensions-samples.

parth-r-parmar avatar parth-r-parmar commented on May 24, 2024

Style issue :
Add double quote in style attribute of button.

before

  const tipWidget = createDomElement(`
    <button class="navigation-rail__link" popovertarget="tip-popover" popovertargetaction="show" style="padding: 0; border: none; background: none;>
      <div class="navigation-rail__icon">
        <svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24" fill="none"> 
        <path d='M15 16H9M14.5 9C14.5 7.61929 13.3807 6.5 12 6.5M6 9C6 11.2208 7.2066 13.1599 9 14.1973V18.5C9 19.8807 10.1193 21 11.5 21H12.5C13.8807 21 15 19.8807 15 18.5V14.1973C16.7934 13.1599 18 11.2208 18 9C18 5.68629 15.3137 3 12 3C8.68629 3 6 5.68629 6 9Z'"></path>
        </svg>
      </div>
      <span>Tip</span> 
    </button>
  `);

after

  const tipWidget = createDomElement(`
    <button class="navigation-rail__link" popovertarget="tip-popover" popovertargetaction="show" style="padding: 0; border: none; background: none;">
      <div class="navigation-rail__icon">
        <svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24" fill="none"> 
        <path d='M15 16H9M14.5 9C14.5 7.61929 13.3807 6.5 12 6.5M6 9C6 11.2208 7.2066 13.1599 9 14.1973V18.5C9 19.8807 10.1193 21 11.5 21H12.5C13.8807 21 15 19.8807 15 18.5V14.1973C16.7934 13.1599 18 11.2208 18 9C18 5.68629 15.3137 3 12 3C8.68629 3 6 5.68629 6 9Z'"></path>
        </svg>
      </div>
      <span>Tip</span> 
    </button>
  `);

from chrome-extensions-samples.

oliverdunk avatar oliverdunk commented on May 24, 2024

Closing this as a duplicate of #1084 since I just left a more detailed reply there, but thanks all for the feedback.

from chrome-extensions-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.