148 Commits

Author SHA1 Message Date
tcsenpai
7bc012f228 Building from source info added 2024-06-03 13:29:28 +02:00
Adrian Vollmer
af0263a41a
Fix typo in args.py 2024-06-03 11:21:56 +02:00
Adrian Vollmer
708733c51e
Guess mime type from filename first
It seems libmagic is too unreliable.
2024-06-03 11:17:08 +02:00
Adrian Vollmer
6b9c894ed2 Fix document once more after DOM content loaded
This is because some documents alter itself using `document.write`,
which can insert again tags (img, style, script) that expect to live in
a normal environment.

This commit also refactors some of the `retrieveFile` logic. The
function should behave differently when called in the iframe vs the
parent document.
2024-04-30 14:39:41 +02:00
Adrian Vollmer
faccbb8551 Update comment inside the HTML 2024-04-29 10:56:44 +02:00
Adrian Vollmer
610a05b995 Actually build test case 'dark-listing' 2024-04-29 10:15:07 +02:00
Adrian Vollmer
8f14aef403 Ensure zundler runs last when building with sphinx 2024-04-29 10:14:34 +02:00
Adrian Vollmer
8338cb62f7 Fix extraction 2024-04-29 09:35:57 +02:00
Adrian Vollmer
9994f9da03 Add test case dark-listing 2024-04-29 08:56:54 +02:00
Adrian Vollmer
42494ad2a6 Remove redundant sourceURL pragmas 2024-04-28 17:37:10 +02:00
Adrian Vollmer
ff1b32590e Update copyright date 2024-04-28 16:24:21 +02:00
Adrian Vollmer
8bf4084a54 Change headline of info page 2024-04-28 15:23:19 +02:00
Adrian Vollmer
0e12a34121 Use a common venv for tests 2024-04-28 15:19:15 +02:00
Adrian Vollmer
44bfdade54 Minor fixes in tests 2024-04-28 15:15:11 +02:00
Adrian Vollmer
3c91818e66 Black tests 2024-04-28 15:07:16 +02:00
Adrian Vollmer
4de05c4f69 Adjust Makefile 2024-04-28 15:06:14 +02:00
Adrian Vollmer
d1ba6a6b3f Add popup menu 2024-04-28 15:06:14 +02:00
Adrian Vollmer
37ebb12d6b Switch to hatch build system 2024-04-28 15:06:11 +02:00
Adrian Vollmer
adc35023a5 Focus the iframe 2024-04-27 19:42:36 +02:00
Adrian Vollmer
0c594fdc0b Fix bug in file transfer logic 2024-04-27 19:36:32 +02:00
Adrian Vollmer
3eda0fb604 Change behavior of loading indicator
We don't show the loading indicator at all between clicks. Instead, just
append the new iframe. Delete the old iframe when the new one sent the
"ready" message. This way we prevent flashing of the white browser
background, which looks jarring when viewing dark mode pages.
2024-04-27 18:59:25 +02:00
Adrian Vollmer
c39ce14b35 Include second page in test case dark-mode 2024-04-27 18:59:04 +02:00
Adrian Vollmer
e78ef36e03 Add test case for dark-mode 2024-04-27 17:31:14 +02:00
Adrian Vollmer
4c0484a1a5 Show more relevant data in log messages 2024-04-27 17:29:01 +02:00
Adrian Vollmer
f667106a9c Fix issues when mimetype is incorrectly determined
This caused tons of popups.
2024-04-27 17:28:25 +02:00
Adrian Vollmer
e207e2086f Fix links with anchor; add test 2024-04-27 16:55:00 +02:00
Adrian Vollmer
b40354235a Improve performance by using messages
Instead of inserting the entire global context into the iframe's HTML,
where we need to encode it to and decode it from JSON and base64, we
only insert a stripped global context, i.e. without the file tree and
the utils. If these are needed in the iframe, for example when a script
changes the DOM and needs to load an image, we use messages to
communicate with the parent document and retrieve the file in question.
2024-04-27 15:44:16 +02:00
Adrian Vollmer
c2373c6493 Point source in README to PyPI 2024-04-22 20:47:52 +02:00
Adrian Vollmer
dad164ab57 Fix test 2024-04-22 20:45:37 +02:00
Adrian Vollmer
6648b5e619 Fix fixLinks
Don't touch links starting with `javascript:`
2024-04-22 20:41:34 +02:00
Adrian Vollmer
76f8976646 Remove debug statement 2024-04-22 20:41:29 +02:00
Adrian Vollmer
ada047fba8 Forgot to remove this when moving it to common.js 2024-04-22 20:40:51 +02:00
Adrian Vollmer
196e945d7e Expand multi-page test
(Failing right now.)
2024-04-22 20:28:42 +02:00
Adrian Vollmer
4874a2552d Treat javascript href's not as virtual link 2024-04-22 20:28:23 +02:00
Adrian Vollmer
2399acaabd Fix observation of mutated elements
Needs to be installed after DOM loaded.
2024-04-22 20:28:06 +02:00
Adrian Vollmer
a479b350e9 Adjust all the other tests to use podman selenium 2024-04-22 20:27:45 +02:00
Adrian Vollmer
9539778225 Don't use Edge right now 2024-04-22 20:27:22 +02:00
Adrian Vollmer
0fa98c1a51 Use selenium fixture for all browsers 2024-04-22 20:27:05 +02:00
Adrian Vollmer
763c120413 Remove debug statement 2024-04-22 20:01:12 +02:00
Adrian Vollmer
66aa150326 Use pytest-docker for selenium 2024-04-22 00:07:10 +02:00
Adrian Vollmer
2a8cbc75c8 Add logic for a menu 2024-04-21 17:35:29 +02:00
Adrian Vollmer
1df42864cd Center loading indicator 2024-04-21 17:35:29 +02:00
Adrian Vollmer
b496b1cad7 Fix doc title and loading indicator 2024-04-21 17:35:29 +02:00
Adrian Vollmer
8aa570030b Rename some files; also finish some work from prev commit 2024-04-21 17:35:29 +02:00
Adrian Vollmer
54fda10acc Embed pre and post scripts in javascript
This also removes the dependency on beautifulsoup.
2024-04-21 17:35:15 +02:00
Adrian Vollmer
2e8a3ee989 Use camel case in JS 2024-04-21 16:23:03 +02:00
Adrian Vollmer
ac664c27a1 Avoid manually triggering DOMContentLoaded
It confuses scripts when it is triggered twice. Instead of passing the
global context, we simply write it into the HTML of the iframe.
We need to encode it in base64 to avoid context confusion (e.g. `</script>`
inside the JSON of the global context).
2024-04-21 15:37:23 +02:00
Adrian Vollmer
9faf9ca98b Add URL pragma of main.js in python code 2024-04-21 14:56:22 +02:00
Adrian Vollmer
1170afbfd3 Add makefile 2024-04-20 17:57:40 +02:00
Adrian Vollmer
04777f15f8 Show version in HTML source 2024-04-09 18:45:53 +02:00