Skip to content

Commit

Permalink
added threadUnroll.initPageAsApi so I can use this function on dekkia…
Browse files Browse the repository at this point in the history
….zip
  • Loading branch information
RealDekkia committed Apr 21, 2024
1 parent 58f2213 commit 745957c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion thread/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<link rel="stylesheet" href="css/style.css" type="text/css" />
</head>

<body>
<body onload="threadUnroll.initPage()">
<div id="topBarBox">
<a id="topbarMainPageButton" href="../">
<img id="topBarImage" src="../img/logo.svg"
Expand Down
10 changes: 7 additions & 3 deletions thread/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ const threadUnroll = {
}
}
},
initPageAsApi: function (instanceUri, statusID, callback) {
if (instanceUri && statusID && callback) {
threadUnroll.initApi(instanceUri);
threadUnroll.getAllStatuses(statusID, [], callback, true, statusID);
}
},
initApi: function (instanceUri) {
threadUnroll.api = new MastodonAPI({
instance: instanceUri,
Expand Down Expand Up @@ -230,6 +236,4 @@ const threadUnroll = {
}

}
};

threadUnroll.initPage();
};

0 comments on commit 745957c

Please sign in to comment.