Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
Bookmarklet code is erroring on const and let
javascript:
(async () => {
    const rss = [
        'https://www.upwork.com/ab/feed/jobs/rss?api_params=1&orgUid=424151849314844673&paging=0%3B10&q=title%3A%28cto%29&securityToken=925852acb79387c67d921519fd18fed25f501cc940c417db8a53c2ee9530a5a4c9fb27ac83bd44992aaa39d2509a1aa6e7053c4795d714657bc4ac744b268718&sort=recency&userUid=424151849306456064&user_location_match=1'
    ];

    let htm = '<section id="feed">';

    rss.map(async feed => {
        console.log('feed', feed);
        const res = await fetch(feed);
        const xml = await res.text();
        console.log('xml', xml);
        const node = new window.DOMParser().parseFromString(xml, "text/xml")
        const items = [...node.querySelectorAll('item')];

        items.map(item => {
            const link = item.querySelector('link');
            const title = item.querySelector('title');

            htm += `
            <div class="item">${link} - ${title}</div>
            `;
        });
    });

    htm += '</section>';
    document.body.insertAdjacentHTML('beforeend', htm);
})();

Here is the one liner:

javascript: (async () => {const rss = ['https://www.upwork.com/ab/feed/jobs/rss?api_params=1&amp;orgUid=424151849314844673&amp;paging=0%3B10&amp;q=title%3A%28cto%29&amp;securityToken=925852acb79387c67d921519fd18fed25f501cc940c417db8a53c2ee9530a5a4c9fb27ac83bd44992aaa39d2509a1aa6e7053c4795d714657bc4ac744b268718&amp;sort=recency&amp;userUid=424151849306456064&amp;user_location_match=1']; let htm = '<section id="feed">'; rss.map(async feed => {console.log('feed', feed); const res = await fetch(feed); const xml = await res.text(); console.log('xml', xml); const node = new window.DOMParser().parseFromString(xml, "text/xml") const items = [...node.querySelectorAll('item')]; items.map(item => {const link = item.querySelector('link'); const title = item.querySelector('title'); htm += ` <div class="item">${link} - ${title}</div> `; }); }); htm += '</section>'; document.body.insertAdjacentHTML('beforeend', htm); })();

I'm just trying to fetch and RSS feed and show results in a div on the page. But it throws an error on the first line with const

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!