Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unloosen

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unloosen

  • 0.1.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Unloosen ruby loader

Unloosen is Chrome extension framework!

Quickstart

  1. create app.rb
# app.rb
require "unloosen"

content_script site: "www.example.com" do
    h1 = document.getElementById("")
    h1.innerText = "Unloosen Example Page!"
end
  1. create manifest.json
{
    "manifest_version": 3,
    "name": "unloosen quickstart",
    "description": "this extension is running by ruby!",
    "version": "0.0.1",
    "content_scripts": [
        {
            "js": [
                "loader-content-script.esm.js"
            ],
            "matches": ["http://www.example.com/"]
        }
    ],
    "content_security_policy": {
        "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';"
    },
    "web_accessible_resources": [
        {
          "resources": ["*"],
          "matches": ["<all_urls>"]
        }
    ]
}
  1. download libraries

In this time, download loader-content-script.esm.js and module-content-script.esm.js and place same dir.

  1. load extension

In your browser, toggle on developer mode and select load unpackaged extension then select current dir.

  1. test run

access http://www.example.com/

when everything goes fine, the header will be "Unloosen Example Page!".

examples

example extensions

how unloosen works

wbRubykaigi2023Slide-how unloosen works drawio

supported function

namemethod aliasloadfile
Popuppopupmodule-popup.esm.js
Content Scriptcontent_scriptloader-content-script.esm.js and module-content-script.esm.js(both required)
Backgroundbackgroundmodule-background.esm.js
SandBox(WIP)sandboxmodule-sandbox.esm.js
OnInstalled eventon_installedmodule-background.esm.js

Unloosen sample

https://github.com/aaaa777/unloosen-test-extension

TODO: Delete this and the text above, and describe your gem

Installation

install with npm i unloosen-ruby-loader

after downloading, loader/module files in node_modules/unloosen-ruby-loader/dist/entry/*.esm.js

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/aaaa777/unloosen.

FAQs

Package last updated on 11 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc