Since Polisens web queueing solution for getting a passport sucks, and it is more or less impossible to book a time, I wrote this small javascript. What it does is that it automates the searching for a bookable time. In the file you just change the constants to your preferred booking dates and away you go. :) More or less.
If the script you have on your computer stops working, make sure to check for updates and download the latest version.
My site about Pass für alle (in Swedish)
In the script there are some constainst that you need to change, they are found under the comment // Constants
var dateFrom = today();
If you want to start some other day, just change this to a date with the format YYYY-MM-DD
var dateFrom = '2022-08-24';
var dateTo = '2022-12-24';
var autoConfirm = true;
If you don't want to allow auto confirm of found time slot, change to false
.
var autoConfirm = false;
- Download the code to your computer, easiest way is to click here. This is the same file you get when clicking the green Code-button, followed by Download Zip. Extract the zip-file.
- Go to Tampermonkey and install the addon to your browser.
- Click the new icon in your browser for Tampermonkey and click
Create a new script
. - Open the
pass-fur-alle.js
file with a simple text editor like TextEdit, Notepad or something like that. - Copy all the codefrom
pass-fur-alle.js
and paste it in the Tampermonkey editor in the browser (replacing whatever is there) and save.
- Go to the booking site.
- On the step 4, where you search for free slots the buttons are changed to work for you, instead of you working for the buttons.
- Click whatever suits you, and the site will try to find you a good slot.
- When a slot has been found you will get an alert, click OK to continue.