Skip to content
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.
/ fpreviewext Public archive

[clone of the original at gitlab.com/jzacsh/fpreviewext] chrome extension to inject grid of image previews into file:// pages

License

Notifications You must be signed in to change notification settings

jzacsh/fpreviewext

Repository files navigation

file:// browsing with thumbnails & previews

Build Status

Particularly useful at the moment while all my linux tooling is confused by webp, yet I use webp heavily. Good old browsers, though, can do everything.

For now this is just a media previewer, but I might add other capabilities in the future.

preview of extension’s changes

TODO
  1. get code coverage reports; currently broken:
    istanbul just shows 0/0 statements, branches, functions, lines

  2. report crashing phantomjs upstream; see 20eb8bb04bc88

  3. maybe add README detection/display if viewport is large

contributing

prerequisites
  1. $PATH has some stuff in it, like npm, node but also some utils:
    (none of which i’m guessing are "safe" to assume; eg: if you’re on OSX)

    1. mogrify (imagemagick)

    2. readlink

    3. sed

    4. git

  2. npm install

run unit tests
$ make test
karma start
...
build "packed" chrome extension
$ make PRIVATEK=/abs/path/mykey.pem  # defaults to:
$ make PRIVATEK=/abs/path/mykey.pem extension.crx
mkdir build.29A4wN/extension/
cp manifest.json index.js index.css build.29A4wN/extension/
cd build.29A4wN && zip extension.zip extension/*
  adding: extension/index.css (stored 0%)
  adding: extension/index.js (deflated 65%)
  adding: extension/manifest.json (deflated 44%)
ln --symbolic --force build.29A4wN/extension.zip extension.zip
cleanup existing builds
$ make clean
rm -f extension.zip build.* -rf
cleanup and build in one shot
$ make PRIVATEK=/abs/path/mykey.pem all
rm -f extension.zip build.* -rf
mkdir build.1OQC8F/extension/
cp manifest.json index.js index.css build.1OQC8F/extension/
cd build.1OQC8F && zip extension.zip extension/*
  adding: extension/index.css (stored 0%)
  adding: extension/index.js (deflated 65%)
  adding: extension/manifest.json (deflated 44%)
ln --symbolic --force build.1OQC8F/extension.zip extension.zip
adjusting semver versioning
  1. major or minor version is kept in ./major.minor

  2. make extension.crx auto-builds full semver string

    1. run make target after committing for accurate patch numbers

Table 1. codebase layout
file purpose

Makefile, ./major.minor

build & management files

src/

primary code of this repo

bin/

make helpers or links to dependencies

package.json

manages dependencies: typescript (tsc), and webpack

webpack.config.js

manages webpack behavior

tsconfig.json

manages tsc behavior

build/

volatile temporary directory

node_modules/

dependency installations

License

See ./LICENSE for more. Icon is crafted from these two Iconic icons

About

[clone of the original at gitlab.com/jzacsh/fpreviewext] chrome extension to inject grid of image previews into file:// pages

Resources

License

Stars

Watchers

Forks

Packages

No packages published