Reddit-Widget icon indicating copy to clipboard operation
Reddit-Widget copied to clipboard

ScriptableApp widget which shows your Karma, Profile Image, Cakeday etc.

Reddit Widget for Scriptable App

This widget shows your Karma, Cakeday and Profile Image on your home and lockscreen



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/LoginDatas.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 function[^1]

Known Issues

  • Long usernames (up to 13 symbols) may not display correctly (Small-Widget)
  • Long usertitles may not be displayed correctly in conjunction with username (Medium-Widget)
  • and some small other bugs...

Next Update Includes (...maybe)

  • Push-Notifications when today is your Cakeday and new reached Karma score (25 point steps)

Widget Overview

Theme

The Widget has a Dynamic Gradient Background

Change the background gradient to always Reddit Styled

You only have to change the position of the comment brackets

from:

//Standard dynamic colors for background gradient
let top = Color.dynamic(new Color('#ffffff'), new Color('#0F2D60'))
let middle = Color.dynamic(new Color('#EDEDED'), new Color('#000427'))
let bottom = Color.dynamic(new Color('#D4D4D4'), new Color('#000000'))

/*
//Orange background gradient like the official reddit app icon
let top = new Color('#FF8420')
let middle = new Color('#FD3F12')
let bottom = new Color('#EA2128')
*/
...

to:

/*
//Standard dynamic colors for background gradient
let top = Color.dynamic(new Color('#ffffff'), new Color('#0F2D60'))
let middle = Color.dynamic(new Color('#EDEDED'), new Color('#000427'))
let bottom = Color.dynamic(new Color('#D4D4D4'), new Color('#000000'))
*/

//Orange background gradient like the official reddit app icon
let top = new Color('#FF8420')
let middle = new Color('#FD3F12')
let bottom = new Color('#EA2128')
...

First Run

When you add the widget but also saved your login datas (via script) youll get the Error/First Run Widget.
Open the Script an Enter your Datas from Reddit.


Happy Cakeday

Today is your Cakeday!? The widget will tell you subtly.


⚙️ SETUP

Create Personal Reddit App/Script

  1. Login to your Account and go to https://old.reddit.com/prefs/apps/

  2. Create new Personal Script

  3. Click Checkbox "script" and set a redirect uri (e.g. same as in the image)

  4. Create App

  5. Copy Client_ID & Client_Secret

  6. Config Script

const refreshInt = 90 //in minutes
const enableNotifications = true //beta
const showNotifyBadge = true //all widget sizes
const showUserTitle = true //medium- & large widget
const numberFormatting = 'de-DE' //For karma valuesen. e.g.: en-EN, en-IN etc.
const widgetIcon = 'orange' //small- & medium widget; available icons: alienblue, black, classic, orange, roundorange, oldReddit, reddit, apollo;

Official Reddit API Guidelines: https://github.com/reddit-archive/reddit/wiki/OAuth2

Helper-Shortcut for downloading App-Icon-URLs from the App-Store: https://routinehub.co/shortcut/11635/


Widget Parameter

You can set Karma or Post in the Lockscreen-Widgets.
'Karma' is just for the circular available!


Run Script In App

By running the scirpt In App it will present a menu including Username, Total Karma, Coin Balance & Unread Inbox Count at the Top. You can choose one of the following three options in the sheet: Show small-, medium-, largewidget or open your profile in your standard Reddit-Client (Create Personal Reddit App/Script - 6. Config Script)

Delete Menu

Installing

Install Script

  1. Install Scriptable for iOS
  2. Copy each line of the Script or download this helper shortcut
  3. + Add new Script
  1. Paste it into the new Script
  2. Finish

Add Widget To Homescreen

  1. Go to your homescreen and long tab anywhere
  2. By tapping the + it will opens the gallery
  3. chose or search for scriptable
  4. Chose the widget-size and tap "Add Widget"
  5. Tap the widget and choose the script, then set "When Interacting" = "Run Script"
  6. Set the widget Parameters (Only Lockscreen-Widgets)
  7. Done

On First Run

It will Downloads and Save the Following Symbols at the directory "Reddit-Widget"

iCloud Drive/
├─ Scriptable/
│  ├─ Reddit-Widget/
│  │  ├─ karma.png
│  │  ├─ cakedayApollo.png
│  │  ├─ cakedayConfetti.png
│  │  ├─ profileIcon.png
│  │  ├─ classic.png
│  │  ├─ orange.png
│  │  ├─ roundorange.png
│  │  ├─ oldReddit.png
│  │  ├─ black.png
│  │  ├─ alienblue.png
│  │  ├─ arrowsLS.png
│  │  ├─ redditLS.png
---- alternative symbols ----
│  │  ├─ cakedayReddit.png
│  │  ├─ apollo.png
│  │  ├─ reddit.png

⬆️ Jump Back To Start

[^1]:Function is written by the amazing @mvan231 - Thx for your Support