HNHacker News
TopNewBestAskShowJobs

devidw

51 karma · joined January 30, 2022

submissionscomments
devidw··on Execute any JavaScript from any browser tab on any browser tabs
or a browser extension :)
devidw··on Execute any JavaScript from any browser tab on any browser tabs
nah, the idea is to make it easy to execute javascript across multiple tabs
devidw··on Execute any JavaScript from any browser tab on any browser tabs
It's a combination of chrome.runtime messaging api to establish a connection between the calling tab and the service worker and chrome.scripting api to actually execute on the target tabs. Tho you can only send json and not functions over the port so functions have to be stringified and the eval() on the tab main world. Since eval is not possible in extensions itself for good reason the only way is to do this on the tabs, so the tab filtering will also be done in a tab world and will respond the filtered tab ids back to the service worker.
devidw··on Execute any JavaScript from any browser tab on any browser tabs
only chrome/chromium tabs right now
devidw··on Execute any JavaScript from any browser tab on any browser tabs
yea your right, i have addressed this by moving the api from the window object to a dev tools panel page & options page of the extension so the website itself is no longer able to communicate to the service worker of the extension that is opening up the bridge to access all tabs

https://github.com/devidw/tabgod/issues/1#issuecomment-19336...

devidw··on Execute any JavaScript from any browser tab on any browser tabs
yea chrome only right now & yep would prob just have to replace the api signatures where "chrome" is used to port it over
devidw··on Realization: A web without brackets is the better web – folding all brackets
Appreciate your notes
devidw··on Realization: A web without brackets is the better web – folding all brackets
True. I've to commit that I'm not a big fan of the classic approach of footnotes at the bottom of the page.

It doesn't feel like a very nice fit in the context of a digital reading experience. Forcing the user to leave the current reading position to get the additional information at the bottom of the page, and struggling to find back into the text.

But I guess this only applies to the classic implementation of footnotes at the bottom of the page. I assume there are better implementations with a more digital character available.

devidw··on Realization: A web without brackets is the better web – folding all brackets
Thanks a lot, clarifying this from the US perspective. Will consider coming up with a less misleading naming.
devidw··on Realization: A web without brackets is the better web – folding all brackets
I agree, but most times we are not the author of the text we read and therefore have no control over the usage of parentheses by the author.

I think the only way to opt-out is to alter appearances and interactivity on our side with something like a browser extension.

devidw··on Realization: A web without brackets is the better web – folding all brackets
Thanks noting StretchTex. Never heard about it before. Indeed, it shares the same motivation: Allowing users to decide what and in which detail they want to read at.

I would love to see your conclusion about the usage of parentheses respected by authors more often, it makes content so much more accessible and would make a solution like this obsolete.

devidw··on Realization: A web without brackets is the better web – folding all brackets
The current implementation of the idea is a Chrome extension. I can imagine non-chromium based browsers to show things up a little broken.
devidw··on Realization: A web without brackets is the better web – folding all brackets
> Curious: in which branch of English dialect are parentheses called "brackets"?

Quoting Wikipedia:

> In most English-speaking countries, an unqualified word "bracket" refers to the parenthesis (round bracket); in the United States, the square bracket.

https://en.wikipedia.org/wiki/Bracket

---

Thanks sharing your thoughts.

What makes the technique useless for your reading/browsing experience?

devidw··on Realization: A web without brackets is the better web – folding all brackets
> What is bracket folding? What kind of brackets is this even talking about?

The concept of collapsing any text between brackets "(" and ")". Like code folding in IDEs but for the web, mainly for reading long articles blown up by tons of brackets. Wikipedia is a good example.

> tried to interact with the “Try it here” section

Make sure to enable the checkbox on the right side of the demo saying "Collapse brackets", toggling it will turn every pair of brackets into an interactive element, collapsed by default, expandable as needed.

devidw··on Realization: A web without brackets is the better web – folding all brackets
In those cases with valuable and informative content in brackets, I would love to see more authors integrating the content into the sentence directly or adding a new sentence.
devidw··on Realization: A web without brackets is the better web – folding all brackets
Browser extension to collapse all brackets on any website. Everything becomes so clean and readable. Beautiful.
devidw··on Tell HN: Google returning 'Untitled' results that redirect to malware/spam
I come across these links as well and was able to find some of the source code, which generates these spam pages.

Actually, you can go ahead to such a spam page and view the index.html page of the current folder and what you will get is an HTML file with PHP code, which is not interpreted by the PHP interpreter, because the file has a dot HTML extension.

In the script, you can see from where the script fetches the displayed data and from which IPs the data is requested and received.

I copied such an index.html file into a gist: https://gist.github.com/devidw/ce2bdb78bb2e30a8e8437acc2c587...

I also wrote a blog post about the details of what is happening in the PHP script: https://david.wolf.gdn/google-untitled-links-i-found-the-sou...