Git Product home page Git Product logo

vm-dom's Introduction

Violentmonkey

Chrome Web Store Firefox Add-ons Microsoft Edge Add-on Subreddit subscribers

Violentmonkey provides userscripts support for browsers. It works on browsers with WebExtensions support.

More details can be found here.

Join our Discord server:

Discord

Automated Builds for Testers

A test build is generated automatically for changes between beta releases. It can be installed as an unpacked extension in Chrome and Chromium-based browsers or as a temporary extension in Firefox. It's likely to have bugs so do an export in Violentmonkey settings first. This zip is available only if you're logged-in on GitHub site. Open an entry in the CI workflows table and click the Violentmonkey-... link at the bottom to download it.

Environment Variables

The following environment variables will be injected at compilation time for some features to work:

  • SYNC_GOOGLE_CLIENT_ID / SYNC_GOOGLE_CLIENT_SECRET - Google sync service
  • SYNC_ONEDRIVE_CLIENT_ID / SYNC_ONEDRIVE_CLIENT_SECRET - OneDrive sync service

Workflows

Development

Install Node.js and Yarn v1.x.
The version of Node.js should match "node" key in package.json.

# Install dependencies
$ yarn

# Watch and compile
$ yarn dev

Then load the extension from 'dist/'.

Build

To release a new version, we must build the assets and upload them to web stores.

# Build for normal releases
$ yarn build

# Build for self-hosted release that has an update_url
$ yarn build:selfHosted

Release

See RELEASE for the release flow.

Related Projects

vm-dom's People

Contributors

gera2ld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vm-dom's Issues

render svg tag does not work

The Problem

render <svg viewBox="0 0 24 24">..</svg>
returns <svg viewbox="0 0 24 24">..</svg>   # the viewbox case is lowered

The Cause

svg is XML element, it's case-sensitive, unlike HTML element. see more here, that means we need to use document.createElementNS('http://www.w3.org/2000/svg', 'svg'); to create svg element instead of document.createElementNS('http://www.w3.org/1999/xhtml', 'svg');, need to fix the code here

How to fix

React is using parentNamespace

Appends as [object Object]

// ==UserScript==
// @name        Test Panel
// @description Test panel with vm-dom
// @match       *://*/*
// @version     1.5.0
// @author      Wilux
// @require     https://cdn.jsdelivr.net/combine/npm/@violentmonkey/dom@2,npm/@violentmonkey/[email protected]
// @grant       GM_addStyle
// @grant       GM_getValue
// @grant       GM_setValue
// ==/UserScript==

(function () {
  "use strict";
  function PanelMenu() {
    return VM.h(
      "div",
      {
        className: "accountbody",
      },
      VM.h(
        "h3",
        {
          className: "test",
        },
        "Hello"
      )
    );
  }
  document.body.appendChild(VM.h(PanelMenu, null));
})();

I didn't add css to avoid confusion. Any idea why this not working?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.