edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] much more general plugin system
@ 2018-03-04 14:20 Karl Dahlke
  2018-03-09 20:40 ` Adam Thompson
       [not found] ` <20180311133017.5luo5p5u76xah72g@toaster>
  0 siblings, 2 replies; 3+ messages in thread
From: Karl Dahlke @ 2018-03-04 14:20 UTC (permalink / raw)
  To: Edbrowse-dev

I think this relates to what Adam was asking about last month.
I didn't follow at the time, but maybe this is it.
With the latest, we can key on any protocol, not just the ones edbrowse knows about.
You can even make up nonsensical protocols for your own purpose.
This was inspired by a question from tsp:
in directory mode, could you click on a zip archive and see the files
and directories at the top level?
Then click on a directory to descend, as though it was a file system.
Clcik on a file and it is in your buffer.
^ to go back.
Is it possible, without hardcoding it in edbrowse, which nobody wants to do.
Is it possible without inflating the whole archive, which again, nobody wants to do.
Well yes you can.
See these two files.

http://www.eklhad.net/traverse.zip

There are 3 plugins and a bash script that you need to put in your bin.
Enjoy, and explore, and send me all sorts of bug reports,
because this was a change to 400 lines of code.

Karl Dahlke

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Edbrowse-dev] much more general plugin system
  2018-03-04 14:20 [Edbrowse-dev] much more general plugin system Karl Dahlke
@ 2018-03-09 20:40 ` Adam Thompson
       [not found] ` <20180311133017.5luo5p5u76xah72g@toaster>
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Thompson @ 2018-03-09 20:40 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

On Sun, Mar 04, 2018 at 09:20:17AM -0500, Karl Dahlke wrote:
> I think this relates to what Adam was asking about last month.
> I didn't follow at the time, but maybe this is it.
> With the latest, we can key on any protocol, not just the ones edbrowse knows about.
> You can even make up nonsensical protocols for your own purpose.

Yeah that's where I was going, although I didn't quite manage to put together a coherent explanation.  Thanks for implementing this.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Edbrowse-dev] much more general plugin system
       [not found] ` <20180311133017.5luo5p5u76xah72g@toaster>
@ 2018-03-11 15:13   ` Karl Dahlke
  0 siblings, 0 replies; 3+ messages in thread
From: Karl Dahlke @ 2018-03-11 15:13 UTC (permalink / raw)
  To: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 1899 bytes --]

Adam writes:
> an attribute to prevent some protocols
> from being called by js from the internet.

I touched upon this briefly, suggesting a theoretical way js could get at local files.
TBH, I don't think js should access any of our plugins, period.
It fetches files via transport, that's it.
I must have been thinking this at a subconscious level, because it's already implemented, at least 3/4.
In the following program, zipx://hole.zip@:@talk is a valid
url to extract a file from my zip archive. The db3 log follows.

<head>
<script src=zipx://hole.zip@:@talk></script>
<LINK href=zipx://hole.zip@:@talk rel=stylesheet type=text/css>
</head>
<body>
<p> hello  world
<iframe src=zipx://hole.zip@:@talk></iframe>
<script>
// access a variable that will expand the frame
frames[0].contentDocument;
var xhr = new XMLHttpRequest;
xhr.url = "zipx://hole.zip@:@talk";
xhr.method = "GET";
xhr.send("", 0);
</script>
</body>

* b
create js context 0
css source zipx://hole.zip@:@talk
894 persistent cookies, 0 expired
the zipx protocol is not supported by edbrowse
could not fetch CSS
execute eb$qs$start
execution complete
js source zipx://hole.zip@:@talk
the zipx protocol is not supported by edbrowse
could not fetch javascript
execute jg at 9
fetch frame zipx://hole.zip@:@talk
plugin ebunzip zipx://hole.zip@:@talk
text type is ascii
create js context 1
execute eb$qs$start
execution complete
xhr zipx://hole.zip@:@talk
the zipx protocol is not supported by edbrowse
execution complete
52
* qt
894 persistent cookies, 0 expired

As you see, a frame can tap into our protocols, and I wanted that because frames are often youtube videos, and I want to type exp and listen to the video.
An approach here might be that frames can run players, but not converters.
A frame will never be a word doc, for instance.
What do you think?

Karl Dahlke

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-11 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-04 14:20 [Edbrowse-dev] much more general plugin system Karl Dahlke
2018-03-09 20:40 ` Adam Thompson
     [not found] ` <20180311133017.5luo5p5u76xah72g@toaster>
2018-03-11 15:13   ` Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).