-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: Add topic-vote click transformer for theme/plugin extensions (#207)
- Loading branch information
1 parent
e6dbd1f
commit 4f10bf1
Showing
2 changed files
with
33 additions
and
18 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
assets/javascripts/discourse/pre-initializers/transformers.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { withPluginApi } from "discourse/lib/plugin-api"; | ||
|
||
export default { | ||
name: "discourse-topic-voting-transformers", | ||
before: "freeze-valid-transformers", | ||
|
||
initialize() { | ||
withPluginApi("1.35.0", (api) => { | ||
api.addBehaviorTransformerName("topic-vote-button-click"); | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters