Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: htmlpreview/htmlpreview.github.com
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: html-preview/html-preview.github.io
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Sep 25, 2020

  1. Copy the full SHA
    677e42f View commit details

Commits on Aug 24, 2023

  1. Do not modify external URLs with segment

    See #133
    agmt committed Aug 24, 2023
    Copy the full SHA
    0a708f7 View commit details
  2. Copy the full SHA
    a992c59 View commit details

Commits on Jan 21, 2024

  1. Copy the full SHA
    4683f92 View commit details
  2. Copy the full SHA
    b31913b View commit details
  3. Copy the full SHA
    8f2b2a5 View commit details
  4. Copy the full SHA
    e1d5bd6 View commit details
  5. Explicit support for protocol and port

    This makes it easier to test using a localhost server
    
    # Conflicts:
    #	htmlpreview.js
    hoijui committed Jan 21, 2024
    Copy the full SHA
    bd9b7ba View commit details
  6. Copy the full SHA
    2f0418e View commit details
  7. Copy the full SHA
    f87c52b View commit details
  8. JS: Reformat long code lines, all comments and adds curly braces

    This does not change any code-logic,
    but is meant to make the code more readable.
    hoijui committed Jan 21, 2024
    Copy the full SHA
    12f625c View commit details
  9. Renames README to uppercase

    hoijui committed Jan 21, 2024
    Copy the full SHA
    59aff68 View commit details

Commits on Jan 26, 2024

  1. Fixes a few linter warnings

    hoijui committed Jan 26, 2024
    Copy the full SHA
    90ed071 View commit details
  2. Moves a comment [minor]

    hoijui committed Jan 26, 2024
    Copy the full SHA
    6e13ec1 View commit details
  3. Renames url to raw_file_url

    hoijui committed Jan 26, 2024
    Copy the full SHA
    64a3bab View commit details
  4. Doc-comments function rewrite

    hoijui committed Jan 26, 2024
    Copy the full SHA
    220d9e0 View commit details
  5. Moves a variable [minor]

    hoijui committed Jan 26, 2024
    Copy the full SHA
    171b734 View commit details
  6. Copy the full SHA
    e663440 View commit details
  7. Modularization [major]

    Introduces and uses these new functions:
    
    - `isGitForgeFileUrl`
    - `isHtmlUrl`
    - `rewriteCond`
    
    This allows us to extend support for other platforms
    then GitHub and BitBucket
    more easily in the future.
    hoijui committed Jan 26, 2024
    Copy the full SHA
    2adb630 View commit details
  8. Copy the full SHA
    4f93836 View commit details
  9. Copy the full SHA
    a199696 View commit details
  10. Copy the full SHA
    c66fd42 View commit details
  11. Adds git ignore

    hoijui committed Jan 26, 2024
    Copy the full SHA
    fdad1d0 View commit details
  12. Copy the full SHA
    7404014 View commit details
  13. Copy the full SHA
    9d644f5 View commit details
  14. Copy the full SHA
    82b896f View commit details
  15. Introduces Node.js package management

    This is only used for dependencies and script;
    we are not really a Node.js package/we do not depend on Node.js.
    hoijui committed Jan 26, 2024
    Copy the full SHA
    fce5c6b View commit details
  16. Copy the full SHA
    ef51a6e View commit details
  17. Adds forges.md

    hoijui committed Jan 26, 2024
    Copy the full SHA
    d7b9766 View commit details
  18. Copy the full SHA
    35f6c36 View commit details
  19. Copy the full SHA
    8de97ea View commit details
  20. CI: Deploys to GH Pages

    hoijui committed Jan 26, 2024
    Copy the full SHA
    2ffce09 View commit details
  21. Copy the full SHA
    99c6428 View commit details
  22. Copy the full SHA
    7c7b503 View commit details
  23. Copy the full SHA
    498ead7 View commit details
  24. README: Fixes two typos

    hoijui committed Jan 26, 2024
    Copy the full SHA
    fe05798 View commit details

Commits on Jan 27, 2024

  1. Copy the full SHA
    426b6f9 View commit details
  2. Copy the full SHA
    a5652cd View commit details

Commits on Jan 28, 2024

  1. Rewrites long lines

    hoijui committed Jan 28, 2024
    Copy the full SHA
    43d02a3 View commit details
  2. Copy the full SHA
    7e723ad View commit details
  3. Moves comment [minor]

    hoijui committed Jan 28, 2024
    Copy the full SHA
    64fa87d View commit details
  4. Copy the full SHA
    8c79ec2 View commit details
  5. Improves/extends doc comments

    hoijui committed Jan 28, 2024
    Copy the full SHA
    e996acb View commit details
  6. lint: Enables some more lints

    hoijui committed Jan 28, 2024
    Copy the full SHA
    c77b114 View commit details
  7. Copy the full SHA
    d9b6929 View commit details
  8. Only use single-qote strings

    hoijui committed Jan 28, 2024
    Copy the full SHA
    d5983af View commit details
  9. Copy the full SHA
    e14a531 View commit details
  10. Copy the full SHA
    f941311 View commit details
  11. Copy the full SHA
    1b4a441 View commit details
  12. Also use origin for anchors

    hoijui committed Jan 28, 2024
    Copy the full SHA
    7d5d952 View commit details
Showing with 4,025 additions and 88 deletions.
  1. +254 −0 .eslintrc.yml
  2. +68 −0 .github/workflows/pages.yml
  3. +5 −0 .gitignore
  4. +73 −0 LICENSE.txt
  5. +73 −0 LICENSES/Apache-2.0.txt
  6. +10 −0 LICENSES/Unlicense.txt
  7. +75 −0 README.md
  8. +101 −0 forges.md
  9. +395 −60 htmlpreview.js
  10. +24 −7 index.html
  11. +2,771 −0 package-lock.json
  12. +2 −0 package-lock.json.license
  13. +39 −0 package.json
  14. +2 −0 package.json.license
  15. +0 −21 readme.md
  16. +92 −0 run/build
  17. +41 −0 run/serve
254 changes: 254 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
# SPDX-FileCopyrightText: 2024 Robin Vobruba <hoijui.quaero@gmail.com>
# SPDX-License-Identifier: Unlicense

root: true
reportUnusedDisableDirectives: true
env:
browser: true
es2021: true
es2024: true
extends: eslint:recommended
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
- "@eslint-community/eslint-plugin-eslint-comments"
- "@stylistic/eslint-plugin-js"
- eslint-plugin-array-func
- eslint-plugin-i
- eslint-plugin-jquery
- eslint-plugin-no-jquery
- eslint-plugin-no-use-extend-native
- eslint-plugin-regexp
- eslint-plugin-sonarjs
- eslint-plugin-unicorn
- eslint-plugin-vitest
- eslint-plugin-vitest-globals
- eslint-plugin-wc
rules:
"@eslint-community/eslint-comments/disable-enable-pair": error
"@eslint-community/eslint-comments/no-aggregating-enable": error
"@eslint-community/eslint-comments/no-duplicate-disable": error
"@eslint-community/eslint-comments/no-restricted-disable": 'off'
"@eslint-community/eslint-comments/no-unlimited-disable": error
"@eslint-community/eslint-comments/no-unused-disable": error
"@eslint-community/eslint-comments/no-unused-enable": error
"@eslint-community/eslint-comments/no-use": 'off'
"@eslint-community/eslint-comments/require-description": 'off'
"@stylistic/js/array-bracket-newline": 'off'
"@stylistic/js/array-bracket-spacing": [error, never]
"@stylistic/js/array-element-newline": 'off'
"@stylistic/js/arrow-parens": [error, always]
"@stylistic/js/arrow-spacing": [error, {before: true, after: true}]
"@stylistic/js/block-spacing": 'off'
"@stylistic/js/brace-style": [error, 1tbs, {allowSingleLine: true}]
"@stylistic/js/comma-dangle": [error, only-multiline]
"@stylistic/js/comma-spacing": [error, {before: false, after: true}]
"@stylistic/js/comma-style": [error, last]
"@stylistic/js/computed-property-spacing": [error, never]
"@stylistic/js/dot-location": [error, property]
"@stylistic/js/eol-last": error
"@stylistic/js/function-call-spacing": [error, never]
"@stylistic/js/function-call-argument-newline": 'off'
"@stylistic/js/function-paren-newline": 'off'
"@stylistic/js/generator-star-spacing": 'off'
"@stylistic/js/implicit-arrow-linebreak": 'off'
"@stylistic/js/indent": ['error', 'tab']
#[error, 2, {ignoreComments: true, SwitchCase: 1}]
"@stylistic/js/key-spacing": error
"@stylistic/js/keyword-spacing": error
"@stylistic/js/linebreak-style": [error, unix]
"@stylistic/js/lines-around-comment": 'off'
"@stylistic/js/lines-between-class-members": 'off'
"@stylistic/js/max-len": error
"@stylistic/js/max-statements-per-line": error
"@stylistic/js/multiline-ternary": 'off'
"@stylistic/js/new-parens": error
"@stylistic/js/newline-per-chained-call": 'off'
"@stylistic/js/no-confusing-arrow": 'off'
"@stylistic/js/no-extra-parens": 'off'
"@stylistic/js/no-extra-semi": error
"@stylistic/js/no-floating-decimal": 'off'
"@stylistic/js/no-mixed-operators": 'off'
"@stylistic/js/no-mixed-spaces-and-tabs": error
"@stylistic/js/no-multi-spaces": [error, {ignoreEOLComments: true, exceptions: {Property: true}}]
"@stylistic/js/no-multiple-empty-lines": [error, {max: 1, maxEOF: 0, maxBOF: 0}]
"@stylistic/js/no-tabs": [error, allowIndentationTabs: true]
"@stylistic/js/no-trailing-spaces": error
"@stylistic/js/no-whitespace-before-property": error
"@stylistic/js/nonblock-statement-body-position": error
"@stylistic/js/object-curly-newline": 'off'
"@stylistic/js/object-curly-spacing": [error, never]
"@stylistic/js/object-property-newline": 'off'
"@stylistic/js/one-var-declaration-per-line": 'off'
"@stylistic/js/operator-linebreak": ['error', 'before']
"@stylistic/js/padded-blocks": [error, never]
"@stylistic/js/padding-line-between-statements": 'off'
"@stylistic/js/quote-props": 'off'
"@stylistic/js/quotes": [error, single, {avoidEscape: true, allowTemplateLiterals: true}]
"@stylistic/js/rest-spread-spacing": [error, never]
"@stylistic/js/semi": [error, always, {omitLastInOneLineBlock: true}]
"@stylistic/js/semi-spacing": [error, {before: false, after: true}]
"@stylistic/js/semi-style": [error, last]
"@stylistic/js/space-before-blocks": [error, always]
"@stylistic/js/space-before-function-paren": 'off'
"@stylistic/js/space-in-parens": [error, never]
"@stylistic/js/space-infix-ops": error
"@stylistic/js/space-unary-ops": error
"@stylistic/js/spaced-comment": [error, always]
"@stylistic/js/switch-colon-spacing": error
"@stylistic/js/template-curly-spacing": [error, never]
"@stylistic/js/template-tag-spacing": [error, never]
"@stylistic/js/wrap-iife": [error, inside]
"@stylistic/js/wrap-regex": error
"@stylistic/js/yield-star-spacing": [error, after]
lines-around-directive: error
max-classes-per-file: error
max-depth: error
max-lines: off
max-lines-per-function: error
max-nested-callbacks: error
max-params: error
max-statements: error
multiline-comment-style: [error, separate-lines]
multiline-ternary: error
new-cap: error
new-parens: error
newline-after-var: 'off'
newline-before-return: 'off'
newline-per-chained-call: 'off'
no-alert: error
no-array-constructor: error
no-async-promise-executor: error
no-await-in-loop: error
no-bitwise: error
no-buffer-constructor: error
no-caller: error
no-catch-shadow: error
no-continue: error
no-div-regex: error
no-duplicate-imports: error
no-else-return: error
no-empty-function: error
no-eq-null: error
no-eval: error
no-extend-native: error
no-extra-bind: error
no-extra-label: error
no-implicit-coercion: error
no-implicit-globals: error
no-implied-eval: error
no-inline-comments: 'off'
no-inner-declarations: [error, functions]
no-invalid-this: error
no-iterator: error
no-label-var: error
no-labels: error
no-lone-blocks: error
no-lonely-if: error
no-loop-func: error
no-magic-numbers: 'off'
no-misleading-character-class: error
no-mixed-requires: error
no-multi-assign: error
no-multi-str: error
no-native-reassign: error
no-negated-condition: error
no-negated-in-lhs: error
no-nested-ternary: error
no-new: error
no-new-func: error
no-new-object: error
no-new-require: error
no-new-wrappers: error
no-octal-escape: error
no-param-reassign: 'off'
no-path-concat: error
no-plusplus: [error, allowForLoopAfterthoughts: true]
no-process-env: error
no-process-exit: error
no-proto: error
no-prototype-builtins: error
no-restricted-globals: error
no-restricted-imports: error
no-restricted-modules: error
no-restricted-properties: error
no-restricted-syntax: error
no-return-assign: error
no-return-await: error
no-script-url: error
no-self-compare: error
no-sequences: error
no-shadow: error
no-shadow-restricted-names: error
no-spaced-func: error
no-sync: error
no-template-curly-in-string: error
no-ternary: error
no-throw-literal: error
no-undef-init: error
no-undefined: error
no-underscore-dangle: error
no-unmodified-loop-condition: error
no-unneeded-ternary: error
no-unused-expressions: error
no-use-before-define: 'off'
no-useless-call: error
no-useless-catch: error
no-useless-computed-key: error
no-useless-concat: error
no-useless-constructor: error
no-useless-rename: error
no-useless-return: error
no-var: error
no-void: error
no-warning-comments: error
no-with: error
nonblock-statement-body-position: error
object-curly-newline: error
object-curly-spacing: [error, never]
object-shorthand: error
one-var: 'off'
one-var-declaration-per-line: 'off'
operator-assignment: error
operator-linebreak: ['error', 'before']
padded-blocks: 'off'
padding-line-between-statements: error
prefer-arrow-callback: 'off'
prefer-const: error
prefer-destructuring: 'off'
prefer-named-capture-group: 'off'
prefer-numeric-literals: error
prefer-object-spread: error
prefer-promise-reject-errors: error
prefer-reflect: error
prefer-rest-params: error
prefer-spread: error
prefer-template: 'off'
quote-props: 'off'
quotes: 'off'
radix: error
require-atomic-updates: error
require-await: error
require-jsdoc: error
require-unicode-regexp: 'off'
rest-spread-spacing: error
sort-imports: error
sort-keys: [error, asc]
sort-vars: 'off'
space-before-blocks: error
space-before-function-paren: error
space-in-parens: [error, never]
space-infix-ops: error
space-unary-ops: error
spaced-comment: [error, always]
strict: error
switch-colon-spacing: error
symbol-description: error
template-curly-spacing: error
template-tag-spacing: error
unicode-bom: [error, never]
valid-jsdoc: error
vars-on-top: 'off'
yield-star-spacing: error
yoda: [error, never]
68 changes: 68 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# SPDX-FileCopyrightText: 2024 Robin Vobruba <hoijui.quaero@gmail.com>
# SPDX-License-Identifier: Unlicense

name: Deploy to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [ main, master, develop]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Builds what goes to Pages (and runs checks)
build:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: "package-lock.json"

- name: Install JS dependencies
run: npm ci

- name: Combine HTML and JS into a single HTML file & minify it all (including CSS)
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

# Deploy to Pages
deploy:
# Add a dependency to the build job
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
contents: read
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: 2024 Robin Vobruba <hoijui.quaero@gmail.com>
# SPDX-License-Identifier: Unlicense

/public/
/node_modules/
Loading