Fixes#307
- Adds optional adblock support, via wabac.js (dependent on
webrecorder/wabac.js#167).
- For now, adblock enabled only for embeds via the `useAdblock`
attribute, and can be enabled per archived item.
- By default, adblock filter rules from
[EasyList](https://easylist.to/easylist/easylist.txt) are used, however,
a custom filter rules file can be used via `adblockRulesUrl` attribute
(default is ./adblock/adblock.gz)
- Added `fetch-adblock.sh` script to fetch latest easylist, filter out
`##` rules and compress to `./adblock/adblock.gz`
- Not yet possible to enable adblock for standalone browsing via
replayweb.page
- bumps version to 2.0.0-beta.3
- Changes `sl-copy-button` icons to use fontawesome equivalents so they
fit in with everything else in ReplayWebpage
- Converts sl-icon to use fa-icon for error icon
- Adds missing whitespace
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
- Adds TsconfigPathsPlugin
- Custom icons, branding assets, and favicons now all live under
`/src/assets` in organized folders (Mirrors Browsertrix folder
organization and naming)
- Assets can now be referenced with `import: varName from
~assets/assetpath` app wide!
- SVGs continue to use `svg-inline-loader`, favicons are copied to
`/site/favicons` on app build
- Adds favicons to the main `index.html` page for ReplayWeb.page and
`embed.html` example page
- Replace README header with new branding
- Lives under /assets because it's not app related
- Adds new webmanifest app icons
- Adds new Electron app .icns (macOS ) and .png (Windows & Linux) app
icons
- Replaces globe icon in the embed receipt with ReplayWebpage icon!
- Adds lockup to the footer section
- Removes logo animation
- Removes logo values from `renderErrorReport()` in swmanager.ts in
favour of additional import statements
---------
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
Partially addresses #237
- Unhides the load button on smaller screen sizes
- There's no way to actually load new web archives when this is hidden
- Minor text updates
- Renames MIME Type to Media Type
- Punctuation fixes
- Reorder main application controls (#237)
- Group navigation related controls together on the left side
- Move full screen to the right side
- Enable navigation controls on mobile
- Renames URLs tab to Resources - now that we have more space (because we moved the archived item info
to a dialog), we can make these titles visible when space is available to do so!
- This is now in-line with the docs (both current and new!)
It may be useful to be able to have <replay-web-page> embed also take
over the favicons for the page, propagating them from the replay (eg. if
in a single page app where replay takes up most of the view).
This PR adds a `updateFavicons` attribute, used as `<replay-web-page ...
updateFavicons>` to have icons propagated from the replay to the
top-level frame. (This may be especially useful with `deepLink` option,
which allows for linking directly to archived pages)
Details:
- enabled via 'updateFavicons' attribute on <replay-web-page>
- pass icons via postMessage() update, adding type to embed message to
allow different types of message
- currently supporting 'urlchange' and 'favicons' message types
- add shared updateFaviconLinks() in misc.ts, used by both embed and
main app
---------
Co-authored-by: emma <hi@emma.cafe>
Follow-up from #288
This matches the strictness rules with the Browsertrix repo,
specifically `noImplicitAny`, and then adds `// @ts-expect-error`s to
suppress existing errors this change raises. This'll help us keep code
quality high moving forward.
Going to just directly merge this once it passes CI; as with #288, this
doesn't change any code, just comments.
This copies the rules from the Browsertrix repo, and uses
[`suppress-eslint-errors`](https://www.npmjs.com/package/suppress-eslint-errors)
to suppose the violations. I'll take a pass at cleaning this up at some
point in the future, and let's do our best to address these in the
future as we come across them :)
This'll help ensure new code being added to this repo is held to the
same standard as code in Browsertrix's frontend.
Closes#283
Not too sure what the root of the problem actually is, but removing the
overflow seems to fix it, though it does change the sizing somewhat.
I've adjusted the padding to compensate, so it should look the same as
it did before.
The source rules are coming from Bulma, which I don't know super well,
so I don't mind overriding it in this context rather than trying to fix
the underlying issue here.
Preparation for
https://github.com/webrecorder/archiveweb.page/issues/198 /
https://github.com/webrecorder/archiveweb.page/pull/199.
## Changes
- Organizes published files more cleanly, using `dist/types` folder as
the target for type declarations and sourcemaps
- Configures type field in `package.json`
- Updates ESLint & its config
- Sets up type-informed linting rules mirroring browsertrix
- Adds a bunch of other useful eslint and eslint-typescript rules, and
applies auto-fixes to the codebase
- Cleans up a bunch of types throughout the codebase, particularly parts
of the code used by ArchiveWebPage
- Changes `ItemIndex#_deleting` from `private` to `protected` so that a
part of AWP that extends it can do so properly
- Makes a bunch of previously-implied [non-null
assertions](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-)
explicit
- Updates `URLResource` and `ItemType` types (and renames `Item` →
`ItemType` to disambiguate from the `Item` class)
- Removes `node-sass` and replaces it with `sass-embedded` for much
quicker installs and compilation
Fixes a missed rename, in `src/item-index.ts`: I'd renamed `coll` to
`item` but missed updating it in the `update` method's
`changedProperties` map.
This PR fixes that, and adds better typing to all of the instances of
`changedProperties` by using
[`PropertyValues<this>`](https://lit.dev/docs/components/lifecycle/#typescript-types-for-changedproperties),
and implementing class properties for missing Lit properties.
Converts everything to typescript, adding `@ts-expect-error`s where
necessary. Also makes some progress converting elements to use
decorators, but we're not fully there yet — I think it'll make sense to
continue to do that in future PRs, rather than doing it all in one go,
just so that we can keep up with the dev branch.
add ts-lit-plugin and eslint-typescript
disable no-invalid-css rule
fix a bunch of errors raised by eslint and typescript
run prettier & eslint on the remaining files
remove unused imports
split coll-index into index and info components...
and rename "coll" -> "item" for these.
also includes some fixes for previously-undocumented properties used on
non-ts elements.
extract labeled fields into separate component...
and make a few type improvements too
swap custom copy button for shoelace one
rename a few more missed things