Schedule posts to Bluesky with Cloudflare workers. skyscheduler.work
cf tool bsky-tool cloudflare bluesky schedule bsky service social-media cloudflare-workers
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

bundle settings together

+20 -32
+4 -4
.minify.json
··· 4 4 "terser": { 5 5 "mangle": { 6 6 "toplevel": true, 7 - "reserved": ["pushToast", "addKeyboardListener", "addEasyModalOpen", 8 - "addClickKeyboardListener", "addKeyboardListener", 9 - "addUsernameFieldWatchers", "translateErrorObject", "easySetup", 10 - "clearSettingsData", "openAltText", "openPostAltEditor"] 7 + "reserved": ["pushToast", "addKeyboardListener", 8 + "addClickKeyboardListener", "easySetup", 9 + "addUsernameFieldWatchers", "translateErrorObject", 10 + "openAltText", "openPostAltEditor"] 11 11 } 12 12 }, 13 13 "putout": {
-12
assets/js/appHelper.js
··· 214 214 counterEl.dispatchEvent(new Event("reset")); 215 215 } 216 216 217 - function addEasyModalOpen(buttonID, modalEl, closeButtonID=null) { 218 - addClickKeyboardListener(document.getElementById(buttonID), () => { 219 - clearSettingsData(); 220 - openModal(modalEl); 221 - }); 222 - if (closeButtonID !== null) { 223 - addClickKeyboardListener(document.getElementById(closeButtonID), () => { 224 - closeModal(modalEl); 225 - }); 226 - } 227 - } 228 - 229 217 function setElementRequired(el, required) { 230 218 if (required) 231 219 el.setAttribute("required", true);
+12
assets/js/settings.js assets/js/settingsHelper.js
··· 5 5 document.getElementById("accountDeleteResponse").innerHTML = ""; 6 6 } 7 7 8 + function addEasyModalOpen(buttonID, modalEl, closeButtonID=null) { 9 + addClickKeyboardListener(document.getElementById(buttonID), () => { 10 + clearSettingsData(); 11 + openModal(modalEl); 12 + }); 13 + if (closeButtonID !== null) { 14 + addClickKeyboardListener(document.getElementById(closeButtonID), () => { 15 + closeModal(modalEl); 16 + }); 17 + } 18 + } 19 + 8 20 document.addEventListener("violationOpenSettings", () => { 9 21 if (document.getElementById("violationSettingsLink")) { 10 22 addEasyModalOpen("violationSettingsLink", document.getElementById("changeInfo"));
-1
package.json
··· 20 20 "migrate:all": "npm run migrate:local && npm run migrate:prod", 21 21 "minify:js:main": "minify assets/js/main.js > assets/js/main.min.js", 22 22 "minify:js:app": "cat assets/js/*Helper.js | minify --js > assets/js/app.min.js", 23 - "minify:js:settings": "minify assets/js/settings.js > assets/js/settings.min.js", 24 23 "minify:style:site": "minify assets/css/stylesheet.css > assets/css/stylesheet.min.css", 25 24 "minify:style:dash": "minify assets/css/dashboard.css > assets/css/dashboard.min.css", 26 25 "minify:js": "run-p minify:js:**",
-2
src/layout/dialogs/settingsDialog.tsx
··· 1 1 import { MAX_DASHBOARD_PASS, MIN_DASHBOARD_PASS } from "../../limits"; 2 2 import { APP_NAME } from "../../siteinfo"; 3 3 import { PWAutoCompleteSettings } from "../../types"; 4 - import { settingsScriptStr } from "../../utils/appScripts"; 5 4 import BSkyAppPasswordField from "../fields/appPasswordField"; 6 5 import DashboardPasswordField from "../fields/dashPasswordField"; 7 6 import UsernameField from "../fields/usernameField"; ··· 85 84 </footer> 86 85 </article> 87 86 </dialog> 88 - <script type="text/javascript" src={settingsScriptStr}></script> 89 87 </>); 90 88 }
+3 -11
src/pages/dashboard.tsx
··· 14 14 import { ScheduledPostList } from "../layout/postList"; 15 15 import { ViolationNoticeBar } from "../layout/violationsBar"; 16 16 import { APP_NAME, DASHBOARD_TAG_LINE, SHOW_SUPPORT_PROGRESS_BAR } from "../siteinfo"; 17 - import { 18 - dashboardScriptStr, 19 - dashboardStyleStr, 20 - settingsScriptStr 21 - } from "../utils/appScripts"; 17 + import { dashboardScriptStr, dashboardStyleStr } from "../utils/appScripts"; 22 18 23 19 export default function Dashboard(props: any) { 24 20 const ctx: Context = props.c; ··· 31 27 {href: "/dep/tabs.min.js", type: "script"} 32 28 ]; 33 29 34 - // Our own homebrew js files 35 - const dashboardScripts: PreloadRules[] = [dashboardScriptStr, settingsScriptStr].map((itm) => { 36 - return {href: itm, type: "script"}; 37 - }); 38 30 return (<BaseLayout title="Dashboard" mainClass="dashboard" 39 - preloads={[...PreloadPostCreation, ...defaultDashboardPreloads, ...dashboardScripts]}> 31 + preloads={[...PreloadPostCreation, ...defaultDashboardPreloads, {href: dashboardScriptStr, type: "script"}]}> 40 32 <IncludeDependencyTags scripts={defaultDashboardPreloads} /> 41 33 <div class="row-fluid"> 42 34 <section class="col-3 sidebar"> ··· 85 77 </div> 86 78 </div> 87 79 <AltTextDialog /> 88 - <script type="text/javascript" src={dashboardScriptStr}></script> 89 80 <SettingsDialog pds={ctx.get("pds")} /> 81 + <script type="text/javascript" src={dashboardScriptStr}></script> 90 82 </BaseLayout>); 91 83 };
+1 -2
src/utils/appScripts.ts
··· 1 1 // Change this value to break out of any caching that might be happening 2 2 // for the runtime scripts (ex: main.js & postHelper.js) 3 - export const CURRENT_SCRIPT_VERSION: string = "1.7.17"; 3 + export const CURRENT_SCRIPT_VERSION: string = "1.7.18"; 4 4 5 5 export const getAppScriptStr = (scriptName: string, ext: string="js") => 6 6 `/${ext}/${scriptName}.min.${ext}?v=${CURRENT_SCRIPT_VERSION}`; ··· 8 8 // Eventually make this automatically generated. 9 9 export const mainScriptStr: string = getAppScriptStr("main"); 10 10 export const dashboardScriptStr: string = getAppScriptStr("app"); 11 - export const settingsScriptStr: string = getAppScriptStr("settings"); 12 11 export const dashboardStyleStr: string = getAppScriptStr("dashboard", "css");