Reddit widget for Scriptable-App
This widget shows your Karma, Cakeday and Profile Image on your home and lockscreen
This version of the widget shows your last Post on your home and lockscreen
1.5 Update Notes (November 11th 2024)
- Module file has been added with parts of the original script for performance improvements
- Last post lockscreen-widgets have been revised
- Error widgets have been revised
- Also added last post homescreen-widgets (small, medium, large)
- Removed some parts of the delete menu
- improved delete menu code
- Some parts of the code that were not used have been removed
- General code improvements
1.4.1 Update Notes (January 17th 2024)
- Added a second Circular-Lockscreen-Widget, which shows upvotes and comments of your recent post/comment
- Added also Rectangular-Lockscree-Widget with the same functions
-> Jump To Lockscreen Widgets
1.4 Update Notes (December 27th 2023)
- Added Circular-Lockscreen-Widget. It shows your total karma
- Small improvements of the Large-Widget
1.3.1 Update Notes (December 19th 2023)
- Removed 'Open Profile' dialog
- Added basics for lockscreen widgets
1.3 Update Notes (December 15th 2023)
- Removed the most 3rd party app icons due to recent api changes from reddit
- Added alternative reddit icons, like alienblue, classic & black
- Coin balance is replaced with your cakeday/account age
- The formatting of the karma values has been adjusted slightly
- Small Code improvements
- Added the option to set the widget background gradient into reddit-orange
(You have to move the comment brackets (
/*...*/
) to the default value)
1.2 Update Notes (July 20th 2022)
- Script Saves and pulls reddit login datas on device (~ iCloud/Scriptable/Reddit-Widget/#Datas.json)
- Downloads once profile image & app icons to iCloud for less mobile data usage
- Added 'Delete Menu ⌦' for Downloaded Files
- added first / error widget for all sizes
- Added unread messages badge for large widget, too!
- Added the reddit web-favicon and ReSurfer (amazing reddit client, check it out) as icon option.
- Added the option to use the web-browser instead of reddit, apollo or ReSurfer app (If you also have the reddit app installed, iOS will first open the reddit app instead of the browser)
- Fixed bug where long karma numbers may displayed cutted off in the small-widget
- Small design and functionality improvements
1.1 Update Notes (May 05th 2022)
- Updated Function for calculating karma numbers
(e.g. 1494 = 1.494K; 20567 = 20.57K; 1000000 = 1M etc.)
- Added Feature notification Badge also for Medium Widget
- Added selfupdate function1
The Widget has a Dynamic Gradient Background
The error widget is displayed if you have not yet entered any user credentials or if there is no response from the reddit API.
Reasons for this could be, for example, no internet connection.
Today is your Cakeday!? The widget will tell you subtly.
Official Reddit API Guidelines: https://github.com/reddit-archive/reddit/wiki/OAuth2
-
Login to your Account and go to https://old.reddit.com/prefs/apps/
-
Create new Personal Script
- Click Checkbox "script" and set a redirect uri (e.g. same as in the image)
-
Create App
-
Copy Client_ID & Client_Secret
- Run Script in-app and enter your created user credentials
You can set your own constants at the top of the script
// ===========================================
// ========== START CONFIG ZONE ==============
let refreshInt = 60 //refreshinterval as number in minutes
let showNotifyBadge = true //all home-widget sizes
let showUserTitle = false //medium- & large widget
let numberFormatting = 'de-DE' //For karma valuese. e.g.: en-EN, en-IN etc.
let widgetIcon = 'alienblue' //small- & medium widget; available icons: alienblue, black, classic, orange, roundorange, oldReddit, reddit, apollo;
let widgetType = 'karma' //karma or post
// =========== END CONFIG ZONE ================
//=============================================
You can set Karma
or Post
individual in each Widgets.
'Karma' is not for the rectangular lockscreen widget available!
By running the scirpt In App it will present a menu with the following options.
'Report Bug' Saves just a JSON with the reddit API response. You've to share it manually to get help!
It will Downloads and Save the Following Symbols and a JavaScript Module at the directory "Reddit-Widget"
iCloud Drive/
├─ Scriptable/
│ ├─ Reddit-Widget/
│ │ ├─ redditModule.js
│ │ ├─ karma.png
│ │ ├─ cakedayApollo.png
│ │ ├─ cakedayConfetti.png
│ │ ├─ snoovatar_xxx.png
│ │ ├─ oldReddit.png
│ │ ├─ classic.png
│ │ ├─ orange.png
│ │ ├─ black.png
│ │ ├─ alienblue.png
│ │ ├─ arrowsLS.png
│ │ ├─ redditLS.png
---- alternative symbols ----
│ │ ├─ cakedayReddit.png
│ │ ├─ apollo.png