Necessity is the mother of invention! While more and more regions in Germany are being declared corona risk areas, the toilet paper hamsters seem to be picking up speed again. A clever software developer from Cologne has now written a script for users of iPhones with which you can bring the toilet paper stock in the drugstore around the corner onto the home screen.
Although there is nothing to worry about according to the manufacturers of toilet paper, Germans have preferred to hoard pasta and toilet paper since the beginning of the corona pandemic. With a widget for the iPhone, in the event of a second lockdown, we could save ourselves having to go to all stores – at least when it comes to the dm drugstore.
On GitHub Gist, the Cologne-based software developer Marco Dengel has published code that can be transformed into an attractive and useful widget for the home screen in just a few simple steps. The widget shows the amount of toilet paper available in a dm store of your choice. I’ve got three nearby dm stores on my home screen and show you here step by step how to get the widgets on your iPhone.
Toilet paper widget for iOS: this is how it works
The prerequisite for adding the widget is of course iOS 14. You must also download the Scriptable app from the App Store. It is available free of charge. Click here for the app store download:
Scriptable is a developer tool that, with the right code, can be used by anyone for automation processes on the iPhone. The app is very popular with developers and is luckily available free of charge. You can give a “tip” within the app, which will be billed as an in-app purchase.
Step 1: Create a widget with Scriptable
- Opens the Scriptable app on the iPhone
- Press the plus above and give the script a name (toilet paper for example)
- Copy this code from marco79 on GitHubGist to the clipboard with the iPhone
- Make sure that you have marked lines 1 to 11 completely
- Switch back to the Scriptable app and paste the code into your empty script via copy-and-paste
- Press the blue play arrow at the bottom right
- Press “Close”
- Press “Done”
Step 2: Set the correct dm store
The script runs by default with a Cologne store on Venloer Straße. Now you have to look for your preferred store. You now proceed as follows:
- Opens the dm store search in the browser
- Enter your postcode in the appropriate window
- A map will appear with the stores nearby
- Scroll down a little further to the list
- At your favorite dm store, tap on “More details”
- Now you switch to the browser URL
- The store ID is behind “de-“
- Copies the store ID and switches to the home screen
Step 3: Put the widget on the home screen
- Hold down the home screen briefly on a free area until the apps wobble
- Press the plus sign in the upper right corner
- Scroll through the available widgets until you find “Scriptable” or look for it in the bar
- Select the little widget – it will then appear on the home screen
- Tap it there, the apps still have to wobble
- In the selection menu of the widget you now go to “Script” on “Select”
- Select your toilet paper script
- Then enter the store code of your dm store under “Parameters”
- Tap into the void under the widget
- The dm toilet paper widget appears on the home screen
So you can also put several dm markets on the home screen. The script gets the data from the official product page. Many brands of toilet paper available that you can buy from dm are included.