"SCRIPT" type request ignored
See original GitHub issueExpected 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.
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:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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