question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"SCRIPT" type request ignored

See original GitHub issue

Expected behavior

a script that modifies href gets caught by redirect rule with “ANY” or “SCRIPT” request type

Actual behavior

rule is ignored

Steps to reproduce the problem

  • visit www.youtube.com (either main or any other page, doesn’t matter)
  • click on any channel’s name
  • see the rule being ignored
  • press F5 (or use any other method to reload the url)
  • see the rule being applied

Pictue below shows the rule I’m using. Basically, it’s a redirection from channel’s main page to channel/videos. It does work after typing the url in address bar, but doesn’t when I click “urls” (that are actually scripts, not links; at least one of the events is called yt-navigate) on the youtube itself. image

Here’s the regex url pattern from the screenshot: /https://www\.youtube\.com/(channel|user)\/([a-zA-Z0-9\-]+)\/?$/ and the redirection target: https://www.youtube.com{pathname/\/$/}/videos

You can ignore path patterns and check “any url” when testing - it’s probably slower but works exactly the same.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
anewusercommented, Jun 2, 2020

youtube

0reactions
anewusercommented, Jun 1, 2020

@wjtk4444 I had to update the rules to make the redirection work again. As with the previous version of the extension, middle clicks on channel links work better than normal links:

request-control-rules.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

Script tag with type="text/html" and src="..." loaded, but ignored ...
The script will be requested and loaded into memory (if the script type has a handler), but the actual text itself will not...
Read more >
The <script> tag is ignored and doesn't work [#178507] - Drupal
So far, the only way I can get videos that display using the <script> method is to use the Full HTML input filter...
Read more >
The Script element - HTML: HyperText Markup Language
This attribute indicates the type of script represented. ... All of the other attributes will be ignored, including the src attribute.
Read more >
Type script code is being ignored by sonarcloud
Installed a plugin for pull request analysis on github. EDIT- I realised that it is an issue with the typescript code.
Read more >
Ignoring TypeScript Errors - next.config.js
Next.js fails your production build ( next build ) when TypeScript errors are ... application has errors, you can disable the built-in type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found