Skip to content

Local Files

sixcious edited this page Sep 5, 2024 · 17 revisions

You can make the app work locally with your own files offline. First, you need to give it permission to do so in your Browser's Extension Options. The steps differ depending on the browser you are using:

Chrome

  1. Navigate your browser to chrome://extensions
  2. Find Infy Scroll in the Extension List and click the Details Button
  3. Toggle on Allow access to file URLs

Edge

  1. Navigate your browser to edge://extensions
  2. Find Infy Scroll in the Extension List and click the Details Button
  3. Check Allow access to file URLs

Firefox

There shouldn't be any steps required in Firefox because Infy Scroll doesn't need to modify the URL to append pages. However, please note the following bug on Bugzilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=1266960

Appending a Directory

It's possible to append an entire folder of files. First, you'll want to open up the first file into a tab in your browser.

Choosing the right action

If the files are all numbered in an incrementable sequence (e.g. 001, 002, ...), then you can simply use the Increment URL action and start with the first file. If the files aren't in a sequence, you can use the URL List action and follow the steps below to get all their paths.

Choosing the right append mode

This should be straightforward; if you're appending images, videos, or audio files, use Media. If you're appending local html files, see the section below.

Getting the paths to all the files

In Windows, using File Explorer you can copy the full paths to all the files like so:

  1. Select all the files (Ctrl+A)
  2. On the very first file, hold Shift and Right Click it to bring up the context menu
  3. Select Copy as path from the context menu

You now have the paths to all the files in your clipboard. Before you can paste them into Infy's URL List text input, you need to manually remove the " characters. This can be done by pasting them into a text editor and using its "replace all" function, replacing " with an empty string. (I recommend using Notepad++.) In a future update, this step will no longer be needed as Infy can simply ignore the " characters.

Firefox File Protocol Note

This only applies to Firefox, but you may need to also prepend the file protocol before each URL in the list. For example, if the file URLs you copied all start with your drive letter C:\, you may need to prepend each one with a file protocol like file:\\\. This can be accomplished by using the replace all function in a text editor as described above. In the example noted, this can be done by replacing all instances of C:\ with file:\\\C:\.

Alternative path solution

In Windows, if you rename all the files to the same name, it will add a (n) to the file name, where n is a number starting with 1 and increments it. This can allow you to use the Increment URL action starting with the first file.

Appending Local HTML Files

In addition to appending local media/image files on your computer (using the Media Append Mode), it's also technically possible to load local HTML files (using the URL List or Increment URL Action and the Page or Element Append Modes, but you need to tell your browser it's OK to do so. It's a complex security issue, primarily because browsers don't want JavaScript code to be able to load your other local files without your permission.

So, the way you tell your browser to disable the security constraint is:

  • Chrome/Edge: Start the browser from the command line with the --allow-file-access-from-files flag
  • Firefox: Navigate to about:config and set privacy.file_unique_origin to false

(Note: I obviously can't recommend leaving this setting on permanently!)