All Projects → rhysd → monolith-of-web

rhysd / monolith-of-web

Licence: MIT License
A chrome extension to make a single static HTML file of the web page using a WebAssembly port of monolith CLI

Programming Languages

typescript
32286 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to monolith-of-web

block-aligner
SIMD-accelerated library for computing global and X-drop affine gap penalty sequence-to-sequence or sequence-to-profile alignments using an adaptive block-based algorithm.
Stars: ✭ 58 (-36.96%)
Mutual labels:  wasm
use-ammojs
ammo.js physics for use with react-three-fiber
Stars: ✭ 16 (-82.61%)
Mutual labels:  wasm
holyc
An easy to use C++ to WASM compiler (Highly-experimental)
Stars: ✭ 33 (-64.13%)
Mutual labels:  wasm
rustwasmc
Tool for building Rust functions for Node.js. Combine the performance of Rust, safety and portability of WebAssembly, and ease of use of JavaScript.
Stars: ✭ 97 (+5.43%)
Mutual labels:  wasm
interp
Interpreter experiment. Testing dispatch methods: Switching, Direct/Indirect Threaded Code, Tail-Calls and Inlining
Stars: ✭ 32 (-65.22%)
Mutual labels:  wasm
go-wasm-examples
Some small examples of using Go and WebAssembly
Stars: ✭ 22 (-76.09%)
Mutual labels:  wasm
tarmac
Framework for building distributed services with Web Assembly
Stars: ✭ 55 (-40.22%)
Mutual labels:  wasm
wecty
Frontend ToolKit for Go and TinyGo.
Stars: ✭ 34 (-63.04%)
Mutual labels:  wasm
facade
Facade Framework - autogenerated embedded live dashboards for Rust apps
Stars: ✭ 95 (+3.26%)
Mutual labels:  wasm
rustexp
A Rust regular expression editor and tester that runs entirely within the browser!
Stars: ✭ 59 (-35.87%)
Mutual labels:  wasm
blazor-ui
A collection of examples related to Telerik UI for Blazor Components: https://www.telerik.com/blazor-ui
Stars: ✭ 182 (+97.83%)
Mutual labels:  wasm
warpy
WebAssembly interpreter in RPython
Stars: ✭ 54 (-41.3%)
Mutual labels:  wasm
runno
Browser-based code runner that can be embedded as an iframe or used as a library.
Stars: ✭ 211 (+129.35%)
Mutual labels:  wasm
wrangler2
🤠 wrangle your Cloudflare Workers
Stars: ✭ 349 (+279.35%)
Mutual labels:  wasm
idris-codegen-wasm
WebAssembly Code Generation Backend for Idris Compiler
Stars: ✭ 79 (-14.13%)
Mutual labels:  wasm
Warp
Warp is a blazingly-fast modern Rust based GPU-accelerated terminal built to make you and your team more productive.
Stars: ✭ 1,319 (+1333.7%)
Mutual labels:  wasm
screeps-starter-rust
Starter Rust AI for Screeps, the JavaScript-based MMO game
Stars: ✭ 55 (-40.22%)
Mutual labels:  wasm
wasm-fizzbuzz
WebAssembly from Scratch: From FizzBuzz to DooM.
Stars: ✭ 1,364 (+1382.61%)
Mutual labels:  wasm
learn-wasm
🎲 Learning WebAssembly
Stars: ✭ 57 (-38.04%)
Mutual labels:  wasm
wapc-rust
Rust-based WebAssembly Host Runtime for waPC-compliant modules
Stars: ✭ 75 (-18.48%)
Mutual labels:  wasm

'Monolith of Web': Chrome Extension Port of Monolith

'Monolith of Web' is a Chrome extension ported from CLI tool Monolith. Monolith is a CLI tool to download a web page as static single HTML file. 'Monolith of Web' provides the same functionality as a browser extension by compiling Monolith (written in Rust) into WebAssembly.

usage screenshot

Installation

Usage

popup screenshot

  1. Go to a web page you want to store
  2. Click 'Monolith of Web' icon in a browser bar (above popup window will open)
  3. Click 'Get Monolith' button
  4. Wait for the process completing
  5. The generated single static HTML file is stored in your downloads folder

By toggling icons at bottom of the popup window, you can determine to or not to include followings in the generated HTML file.

  • JavaScript
  • CSS
  • <iframe/>
  • Images

The button at right-bottom toggles if allow CORS request or not. Please read following 'Permissions' section and 'CORS Requests in Background Page' section for more details.

Permissions

  • Required permissions
    • activeTab: This extension gets an HTML text and a page title from the active tab to generate a monolith
    • storage: This extension remembers the last state of toggle buttons at bottom in the popup window.
  • Optional permissions
    • http://*/* and https://*/*: Allow any cross-origin requests in background page. This is runtime permission so this extension does not require by default. Only when you see a broken HTML file is generated due to CORS error in background page, please enable this option. The reason of these permissions are explained in next 'CORS Requests in Background Page' section.

CORS Requests in Background Page

This extension generates a single HTML file in background page of Chrome extension. Since CSP in a content script is not applied in a background page, some resources in content's HTML cannot be fetched in background page.

By default, this extension ignores CORS errors in background page. It is usually not a problem since resources protected by CSP are usually scripts which don't affect main content. But a broken single HTML page may be generated due to CORS errors.

When you see a broken page due to the CORS error in background page, please enable 'allow CORS requests' button at right-bottom in the popup window. Permission dialog will appear to require permissions for sending CORS requests in background page. After accepting it, CORS request error is disabled and all resources should be fetched with no error.

After generating a single HTML file with the runtime permissions, this extension will remove the permissions as soon as possible for security.

Development

WebAssembly port of Monolith is developed in the forked repository. Currently it has some differences and duplicates against the original repository. reqwest did not support Wasm before 0.10.0 so my Wasm port does not use it and uses fetch() directly via js_sys and web_sys crate.

This repository adds the forked Monolith repository as a Git submodule and uses it by bundling sources with Webpack.

Contributing

Creating an issue

Before reporting an issue, please try the same URL with CLI version. If it is reproducible with CLI version, please report it to the CLI repository at first.

If it is not reproducible with CLI version (it means the issue only occurs with this extension), please report it from issues page.

Improve Wasm part

This repository only includes TypeScript part of extension. Wasm part is developed in forked monolith repository. If your improvement can be applied to upstream, please make a pull request in the upstream at first. After the pull request is merged, please make an issue to request to merge upstream at this repository or the forked repository.

License

Distributed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].