diff --git a/extension.json b/extension.json index b92141b7..fe11d70b 100644 --- a/extension.json +++ b/extension.json @@ -65,7 +65,7 @@ "ResourceModules": { "ext.thanks.images": { "class": "ResourceLoaderImageModule", - "selector": ".mw-ui-icon-{name}:before", + "selector": ".mw-ui-icon-thanks-{name}:before", "defaultColor": "#fff", "images": { "userTalk": { @@ -127,6 +127,7 @@ "thanks-thanked-notice" ], "dependencies": [ + "mobile.startup", "ext.thanks.images", "mediawiki.api", "mediawiki.jqueryMsg", diff --git a/modules/ext.thanks.mobilediff.js b/modules/ext.thanks.mobilediff.js index 443d2789..a384e1c2 100644 --- a/modules/ext.thanks.mobilediff.js +++ b/modules/ext.thanks.mobilediff.js @@ -1,6 +1,9 @@ ( function () { // To allow users to cancel a thanks in the event of an accident, the action is delayed. var THANKS_DELAY = 2000, + mobile = mw.mobileFrontend.require( 'mobile.startup' ), + Button = mobile.Button, + Icon = mobile.Icon, msgOptions = { // tag ensures that only one message in workflow is shown at any time tag: 'thanks' @@ -59,9 +62,19 @@ */ function createThankLink( name, rev, gender ) { var timeout, - $button = $( '