Giter Site home page Giter Site logo

matyrobbrt / file-preview Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 761 KB

A static website to preview text files from URLs

Home Page: https://filepreview.matyrobbrt.com/

License: MIT License

HTML 2.12% JavaScript 30.94% Vue 37.22% CSS 14.85% Shell 2.44% Kotlin 11.77% Dockerfile 0.65%
file-preview vuejs

file-preview's Introduction

file-preview

A static website intended to be used for viewing text files from URLs.
This website was made primarily to be used by Discord mobile users to be able to see code files shared in chat (the mobile app does not have in-app file previews, unlike the desktop one).

Dependencies

This website depends on a CORS proxy because some hosts do not add CORS headers to responses.

Usage

In order to use this website simply append the URL of the file you want to view as a URL search parameter (?url=<url>).
The website provides syntax highlighting of a few popular languages via highlight.js. A highlighting language will be attempted to be detected from the URL extension (https://explamle.com/somefile.TXT) and if one can't be detected highlight.js will attempt to detect it based on the contents. You may change the language in the input box at the top of the page.
A raw view is also provided by appending the raw parameter to the URL or by using the View raw button at the top of the page.
Additionally, the theme can be changed from the dropdown at the top of the page. The theme will be persisted in local storage. The default theme is night-owl.

Hosting

While you can self-host this website, a public instance hosted through GitHub Pages is available at https://filepreview.matyrobbrt.com/.

Screenshots

A previewed Java file: Previewed Java file Raw view in dark mode: Raw view in dark mode Raw view in light mode: Raw view in light mode

file-preview's People

Contributors

matyrobbrt avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.