summaryrefslogtreecommitdiff
path: root/plugins/nsfw
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-18 12:27:26 +0300
committerAndrew Dolgov <[email protected]>2021-02-18 12:27:26 +0300
commit39c0fe3697c71e9cfeec74c020b0c31fca376dc0 (patch)
treeb67a018eb001e5c819f3366bc62f2e69b3ff0cd0 /plugins/nsfw
parentee0b66b6bd14d116b878a57f1d35b466d9994138 (diff)
shorten many invocations of Ajax.Request in inline form methods
Diffstat (limited to 'plugins/nsfw')
-rw-r--r--plugins/nsfw/init.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/nsfw/init.php b/plugins/nsfw/init.php
index 0ee3aebc1..fdc6a3974 100644
--- a/plugins/nsfw/init.php
+++ b/plugins/nsfw/init.php
@@ -55,12 +55,10 @@ class NSFW extends Plugin {
<script type="dojo/method" event="onSubmit" args="evt">
evt.preventDefault();
if (this.validate()) {
- new Ajax.Request('backend.php', {
- parameters: dojo.objectToQuery(this.getValues()),
- onComplete: function(transport) {
- Notify.info(transport.responseText);
- }
- });
+ Notify.progress('Saving data...', true);
+ xhrPost("backend.php", this.getValues(), (transport) => {
+ Notify.info(transport.responseText);
+ })
}
</script>