Module:Clickable button 2: Difference between revisions

m
13 revisions imported: import clickable buttons 2
(don't check if we are currently on the args[1] page if we are using a URL link, as args[1] will only be a display value)
m (13 revisions imported: import clickable buttons 2)
 
(3 intermediate revisions by 3 users not shown)
Line 84:
if class == 'ui-button-blue'
or class == 'mw-ui-progressive'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#2962CB'
elseif class == 'ui-button-green' then
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#008B6D'
elseif class == 'ui-button-red' or class == 'mw-ui-destructive' then
or class == 'mw-ui-destructive'
then
data.backgroundColor = '#A6170F'
else
Line 115 ⟶ 112:
end
displaySpan
:attr('role', 'button')
:attr('aria-disabled', 'false')
:css{
['background-color'] = data.backgroundColor,