Commit Graph

41 Commits

Author SHA1 Message Date
evazion
9552b41c0a Update Ruby gems and Yarn packages. 2021-09-14 05:39:18 -05:00
evazion
38edbb0512 Update Yarn packages. 2021-08-28 04:53:33 -05:00
evazion
c8d7f94d7e Update Ruffle version. 2021-08-21 04:01:24 -05:00
Seedgou
35c9eff5bc fix ruffle-mirror version 2021-08-15 02:16:57 -05:00
evazion
9b0fcec7d0 Update Ruby gems and Yarn packages. 2021-04-06 15:51:01 -05:00
evazion
d58a0bf1e4 Fix #4781: Danbooru Javascript object is broken.
Downgrade Webpack from 5.28.0 to 5.26.3. Breakage was introduced at
5.27.0. It's unclear if this is a regression of issue 12742 in Webpack
or if we're doing something else wrong.

hxxps://github.com-webpack-webpack-issues-12742
hxxps://github.com-webpack-webpack-issues-12851
2021-04-01 03:10:44 -05:00
evazion
55980c6fbf Add Ruffle support for Flash files.
Allow viewing Flash posts with the Ruffle emulator.

Known issues:

* Many flash files aren't fully supported.
* In development it sometimes spazzes out and starts triggering random
  keyboard shortcuts when you press any key. This doesn't happen with
  the browser extension.
* We have to put the .wasm file in the public/packs/js directory because
  Ruffle is hardcoded to search for it there.
* If you're running Nginx, you need to make sure you're serving the
  right MIME type for .wasm files or it won't work.
* We're using Some Random Guy's unofficial NPM package for Ruffle, since the
  Ruffle project doesn't publish an official package themselves. We
  should build our own package.

References:

* https://github.com/ruffle-rs/ruffle
* https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-webassembly-mime-type
* https://www.npmjs.com/package/ruffle-mirror
2021-03-31 20:20:22 -05:00
evazion
340eeec023 Update Ruby gems and Yarn packages. 2021-02-28 17:48:30 -06:00
evazion
b2a423af64 Fix #4731: Tag counter in edit boxes should only count unique tags, not repeated.
Just use the `uniq` function from lodash. Adds ~1kb to the build.

Also rename `Utility.regexp_split` to `Utility.splitWords`.
2021-02-23 19:00:58 -06:00
evazion
f42fe5f1f7 Upgrade font packages.
The `typefaces` project has been deprecated in favor of `fontsource`.

https://github.com/KyleAMathews/typefaces
https://github.com/fontsource/fontsource
2021-02-13 18:51:51 -06:00
evazion
db8991babf Update ruby gems and yarn packages. 2021-02-13 18:22:28 -06:00
evazion
3f6e7ff6b5 Fix #4701: Odd behavior on older versions of Chrome.
Regression caused by the upgrade to Webpacker 6.0 in 90cd3293e. This
caused various Javascript errors in old versions of Chrome, which
somehow resulted in the keyboard shortcut for visiting the next page
being triggered when you pressed any key.

Specifically, the mobx library (used by the TagCounter component) called
`Object.entries`, which isn't available in Chrome 49, and for some
unknown reason this triggered the buggy shortcut behavior.

`Object.entries` is supposed to be automatically polyfilled by Babel to
support old browsers, but something changed in Webpacker 6 that broke
this and I couldn't get it working again. The probable cause is that
Webpacker 6 no longer transpiles code inside ./node_modules by default,
which means that any libraries we use that use new Javascript features
won't get transpiled down to support old browsers, but even after fixing
that it still didn't work. The workaround is to just drop mobx and
preact entirely to avoid the issue.
2021-02-07 05:53:32 -06:00
evazion
90cd3293eb Upgrade to Webpacker 6.0. 2021-01-28 00:22:49 -06:00
evazion
2eeee446a5 js: upgrade to MobX 6.0. 2021-01-27 17:46:17 -06:00
evazion
b3a4c7aa43 posts: rewrite tag counter widget in React.
Rewrite the tag counter widget (the one above the tag edit box) to use
React. This is a trial run for using React elsewhere.

We actually use Preact instead of React because it's lighter weight.
We use Mobx for state management because it's cleaner than React's
setState or useState.

This incidentally fixes a couple bugs:

* The tag counter wasn't updated when deleting tags with backspace
* The tag counter wasn't updated when pasting in new tags.
2020-08-02 16:48:45 -05:00
evazion
7bfea5cd19 js: drop stupidtable plugin.
This was only used on the saved search index. It let you click on column
headers to sort the table by that column. This doesn't make sense now
that saved searches are paginated.
2020-07-08 11:31:45 -05:00
evazion
57dcd9ee1a Remove unused gems and yarn packages. 2020-06-30 23:44:03 -05:00
evazion
1760d1fc73 js: upgrade jquery to 3.5.1.
Changelog:

* https://blog.jquery.com/2020/05/04/jquery-3-5-1-released-fixing-a-regression/
* https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
2020-06-30 23:42:37 -05:00
evazion
efe5111a9e js: bundle jQuery with Webpack.
Include jQuery in our Webpack bundle instead of loading it from CDNJS.
This means we no longer load any Javascript libraries from third party
sites.
2020-06-30 23:41:47 -05:00
evazion
94490eb57f Fix #4492: Switch from qtip2 to tippy.js. 2020-06-30 22:40:40 -05:00
evazion
ae7fc7d1bc Update eslint to 7.0, add babel-eslint plugin.
Add babel-eslint plugin so that eslint can recognize optional chaining
syntax (a?.b).
2020-06-19 02:25:28 -05:00
BrokenEagle
8cab65367c Added mono font 2020-05-25 19:15:35 +00:00
evazion
127bd9866d Update ruby gems and yarn packages. 2020-05-04 02:34:42 -05:00
evazion
27f10d53d6 Update ruby gems and yarn packages. 2020-03-23 01:48:59 -05:00
evazion
1385e60f8c Update ruby gems and yarn packages. 2020-02-16 13:08:23 -06:00
evazion
796efccbf4 Update ruby gems and yarn packages. 2020-01-12 13:13:03 -06:00
evazion
9f4ac4c96a js: replace jquery-ujs with @rails/ujs. 2020-01-09 22:15:18 -06:00
evazion
f73bd03576 Update yarn packages. 2019-12-13 19:06:40 -06:00
evazion
b43008a506 notes: add multiple new fonts (#4212).
Add the following fonts:

* Comic (Comic Relief)
* Slab Sans (Anton)
* Slab Serif (Rokkitt)
* Formal Serif (Lora)
* Formal Cursive (Petit Formal Script)
* Print (Kalam)
* Hand (Indie Flower)
* Narrow (Archivo Narrow)
* Blackletter (Unifraktur Maguntia)

Add the following font aliases:

* Comic Sans MS is aliased to Comic Relief.
* Arial Narrow is aliased to Archivo Narrow.
* Rockwell is aliased to Rokkitt.
* Impact is aliased to Anton.
2019-11-26 01:27:41 -06:00
evazion
fedb525305 notes: add fallback font for comic sans (#4212). 2019-11-16 22:43:16 -06:00
evazion
103742eb6c Fix #4058: FontAwesome CDN is slow/blocking.
Switch to the free self-hosted version of FontAwesome. We're not using
any Pro icons, so the Pro version isn't necessary.
2019-10-22 12:02:26 -05:00
evazion
60eaa99784 css: add stylelint. 2019-10-02 01:52:24 -05:00
evazion
f6d63b6843 Fix broken layouts in old browsers that lack flexbox support.
Very old browsers (in particular, Firefox 16 and iOS 8.4 Safari) don't
support flexbox without prefixes, which breaks sidebar and comment
layouts. Extend the browserlist config so that autoprefixer generates
flexbox prefixes for these browsers.
2019-09-30 16:40:56 -05:00
evazion
f2937e3d27 js: update yarn packages. 2019-08-18 11:24:42 -05:00
evazion
d812020030 js: migrate stupidtable and jquery-hotkeys to yarn. 2019-08-14 01:46:43 -05:00
evazion
fccb6cda27 js: migrate dropzone to yarn.
Also fixes a bug where sometimes the dropzone widget didn't work because
of late loading caused by the `<script async>` tag.
2019-08-14 01:46:43 -05:00
evazion
504f785edc Fix #4115: Upgrade to webpack 4.x.
https://github.com/rails/webpacker/blob/master/docs/v4-upgrade.md
2019-07-31 20:17:14 -05:00
Albert Yi
0c791a1257 upgrade webpack-dev-server 2019-01-30 14:05:33 -08:00
evazion
752557e813 Add eslint support.
Run with `yarn run lint` or `bin/webpack`.
2018-08-05 18:30:25 -05:00
Albert Yi
ba74691bc7 remove jquery from package.json since it's loaded at the dom level 2018-08-03 16:04:26 -07:00
Albert Yi
6fa0ae2cf1 Migrate assets to use Webpacker 2018-07-27 15:24:05 -07:00