GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Inline script tags not reported in matrix under certain conditions · Issue #413 · gorhill/httpswitchboard

This repository was archived by the owner on Nov 15, 2017. It is now read-only.
This repository was archived by the owner on Nov 15, 2017. It is now read-only.

Inline script tags not reported in matrix under certain conditions #413

Copy link
Copy link
Open
Open
Inline script tags not reported in matrix under certain conditions#413
Copy link

Description

@gorhill
gorhill
opened on Sep 16, 2014
Issue body actions

Test case: https://news.ycombinator.com/.

Conditions:

  • Scripts allowed by default in matrix
  • No 3rd-party scripts on the page

The problem is this piece of code in contentScriptSummaryHandler() in https://github.com/gorhill/httpswitchboard/blob/master/js/messaging-handlers.js:

if ( pageStats && inlineScriptBlocked ) {
    urls = details.scriptSources;
    for ( url in urls ) {
        if ( !urls.hasOwnProperty(url) ) {
            continue;
        }
        if ( url === '{inline_script}' ) {
            url = frameURL + '{inline_script}';
        }
        r = httpsb.filterRequest(pageURL, 'script', url);
        pageStats.recordRequest('script', url, r !== false, r);
    }
}

Inline script tags should always be counted, even if inlineScriptBlocked is false. inlineScriptBlocked needs to be used to filter out 3rd-party scripts to avoid counting them twice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.