HackerTrans
TopNewTrendsCommentsPastAskShowJobs

devidw

no profile record

Submissions

Show HN: Visual inference exploration and experimentation playground

github.com
46 points·by devidw·2 年前·0 comments

Execute any JavaScript from any browser tab on any browser tabs

github.com
46 points·by devidw·2 年前·32 comments

Realization: A web without brackets is the better web – folding all brackets

bracket-folding.wolf.gdn
16 points·by devidw·4 年前·25 comments

comments

devidw
·2 年前·discuss
or a browser extension :)
devidw
·2 年前·discuss
nah, the idea is to make it easy to execute javascript across multiple tabs
devidw
·2 年前·discuss
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
·2 年前·discuss
only chrome/chromium tabs right now
devidw
·2 年前·discuss
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
·2 年前·discuss
yea chrome only right now & yep would prob just have to replace the api signatures where "chrome" is used to port it over
devidw
·4 年前·discuss
Appreciate your notes
devidw
·4 年前·discuss
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
·4 年前·discuss
Thanks a lot, clarifying this from the US perspective. Will consider coming up with a less misleading naming.
devidw
·4 年前·discuss
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
·4 年前·discuss
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
·4 年前·discuss
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
·4 年前·discuss
> 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
·4 年前·discuss
> 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
·4 年前·discuss
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
·4 年前·discuss
Browser extension to collapse all brackets on any website. Everything becomes so clean and readable. Beautiful.
devidw
·4 年前·discuss
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...