open links in Waterfox (from another app)

It could happen that you cannot open links in Waterfox from another application (such as Thunderbird): blank page and all other tabs crashed.

To solve this issue, you can try adding %u to te Waterfox.desktop file (in .local/share/applications), something like:

Exec=flatpak run net.waterfox.waterfox %u

if you have Waterfox with flatpak

css :hover on a mobile device

There lots of java-scripts to allow an effect such as mouse over on a mobile device (that is without mouse), but there is also a very, very simple solution: to use :active instead of :hover, as in the following example:

@media screen and (max-width: 580px) {
  .tooltip:active .tooltiptext {
  visibility: visible;
  opacity: 1;
}
}

while in desktop screen you can keep
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

syncing firefox

Symlinking logins.json is not possibile, you have to copy it every time. And it is necessary that logins.json matchs to key4.db.

Vivaldi public key issue

After several unsuccessfull attempts to fix a Vivaldi NO_PUBKEY error, I found this working solution:

wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor | sudo dd of=/usr/share/keyrings/vivaldi-browser.gpg

and then:

sudo apt update

link from outside to a part of a file

pdf

It is possible to link a page of a pdf, with the following syntax:

file:///your-path-here/your-pdf-filename-here.pdf#pag=[the-page-number]

or, if the file is within your localhost folder

http://localhost/your-path-here/your-pdf-filename-here.pdf#pag=[the-page-number]

epub

It is possible to link to a given location of an epub file, i.g. with calibre viewer, with a code like the following

file:///your-path-here/your-epub-filename.epub?open_at=epubcfi(/10/2/4/2/132/18/1:65)

You can get the string after open_at (in the above case: epubcfi(/10/2/4/2/132/18/1:65) in the calibre viewer, this way:

  • right click
  • -> go to
  • -> location
  • -> current location (above in the window) : copy

video file

with VLC you can use this code

vlc file:///my-path/my-video.mp4 --start-time=90

where ’90’ are the seconds (after the start of video).

I didn’t manage, so far, to open a video with such a code from a browser.

audio file

You ca do it in several ways. With play (sox) in Linux you can use a code setting not only the start time, but the end one as well:

play '/your-path/your-file.ogg' trim 5:18 =7:01

where 5:18 is the start time, and 7:01 the end one (=7.01 and not = 7:01)

embed a playlist in a web page

After many attempts I finally figured taht it’s impossible embed an audio playlist (such as m3u) to a webpage: you can add only multiple (audio) files, but not a playlist.

I tried with the <audio> tag: nothing to to, even with jquery or javascript. Neither with <embed> or <object> html tags: html developers allow only a single audio playing, not a playlist.

The mimetype “audio/x-mpegurl” doesn’t work.

svg rounded corner and shadow

shadow (like css shadow-box)

At least with Firefox you can use a filter, like the following:

.shadow{filter: drop-shadow(8px 6px 6px gray);}

rounded corner

The simplest way to round the corners of a box is to

  • use rect element with rx and ry attributes (such as rx="20" ry="20")
  • and define the style of rect with stroke-linejoin:round; and something like stroke:[your color]; stroke-width:[the width you like];

You can see the following example

box rounded

svg with external image embedded

All browsers have this limitation: they not allow to show an svg with an external image embedded, such as

<image x="2" y="2" width="somewidth" height="someheight" xlink:href="myimage.jpg">

even though the image is in local.

For security reasons.