Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

trying to go to the source ...

  • 3 个回答
  • 0 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

I am using firefox on a debian installation base: $ firefox-esr --version Mozilla Firefox 91.13.0esr $ uname -a Linux debian 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux $ These days web pages come with all kinds of cr@p; so, at times you need to just get all the links inside the page to parse/eyeball them. What I do is grab the "page source" and/or use "Link Gopher". I have been noticing lately that they don't work anymore. Why? The problem seems to relate to javascript generated pages. When you try to see the source all you see is some javascript one liner.

Of course, firefox must have a way to show the source since it shows to you the actual page unencrypted. Which settings in about:config should you change in order to be able to "go to the source" again? lbrtchx



edit: fixed some formatting issues

I am using firefox on a debian installation base: $ firefox-esr --version Mozilla Firefox 91.13.0esr $ uname -a Linux debian 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux $ These days web pages come with all kinds of cr@p; so, at times you need to just get all the links inside the page to parse/eyeball them. What I do is grab the "page source" and/or use "Link Gopher". I have been noticing lately that they don't work anymore. Why? The problem seems to relate to javascript generated pages. When you try to see the source all you see is some javascript one liner. Of course, firefox must have a way to show the source since it shows to you the actual page unencrypted. Which settings in about:config should you change in order to be able to "go to the source" again? lbrtchx edit: fixed some formatting issues

由James于修改

所有回复 (3)

more options

Have you not tried to contact the site to ask them as well?

more options

You have two choices for viewing the current HTML source of the page as modified by scripts:

(1) Select the entire page content (Ctrl+A), right-click > View Selection Source (not working for me today for some reason)

(2) Open the Page Inspector (right-click the body > Inspect) then right-click the HTML tag at the top of the hierarchy > Copy > Copy Outer HTML and paste into your preferred editor for HTML

more options

You can of course JavaScript (bookmarklet) to get all the links on a page. Getting elements with a JavaScript onclick handler can be a problem, but normal getting links should work like with using document.querySelectorAll('a[href]') or document.links.


javascript:(function(){var L=[],E=prompt('*[onclick]\na[href]','a[href]');if(E){document.querySelectorAll(E).forEach(r=>{var N=r.nodeName;L.push('<'+N+(r.hasAttribute('onclick')?' onclick="'+r.getAttribute('onclick').toString()+'"':'')+(r.href?' href="'+r.href+'"':'')+'>'+(r.textContent?r.textContent.trim():'no-title')+'</'+N+'>')});prompt(L.join('\n'),L)}})()

由cor-el于修改