MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
$(function () { | $(function () { | ||
console.log('[ReportAbuseLink] Running ( | console.log('[ReportAbuseLink] Running (Forced Float)...'); | ||
// Check if already | // Check if already exists | ||
if (document.getElementById('report-abuse- | if (document.getElementById('report-abuse-button')) return; | ||
// Create the link | // Create the link | ||
const link = document.createElement('a'); | |||
link.id = 'report-abuse- | link.id = 'report-abuse-button'; | ||
link.href = mw.util.getUrl('Report_Animal_Abuse'); | link.href = mw.util.getUrl('Report_Animal_Abuse'); | ||
link.textContent = '🐾 Report Abuse'; | link.textContent = '🐾 Report Abuse'; | ||
link.style.color = ' | |||
// Style the link | |||
link.style.position = 'fixed'; | |||
link.style.top = '10px'; | |||
link.style.right = '10px'; | |||
link.style.backgroundColor = '#c00'; | |||
link.style.color = '#fff'; | |||
link.style.padding = '8px 12px'; | |||
link.style.borderRadius = '8px'; | |||
link.style.fontWeight = 'bold'; | link.style.fontWeight = 'bold'; | ||
link.style. | link.style.zIndex = '9999'; | ||
link.style.textDecoration = 'none'; | |||
link.style.boxShadow = '0 2px 6px rgba(0,0,0,0.3)'; | |||
// Insert into body | |||
document.body.appendChild(link); | |||
console.log('[ReportAbuseLink] Floating button inserted.'); | |||
}); | }); |
Revision as of 05:34, 21 April 2025
$(function () { console.log('[ReportAbuseLink] Running (Forced Float)...'); // Check if already exists if (document.getElementById('report-abuse-button')) return; // Create the link const link = document.createElement('a'); link.id = 'report-abuse-button'; link.href = mw.util.getUrl('Report_Animal_Abuse'); link.textContent = '🐾 Report Abuse'; // Style the link link.style.position = 'fixed'; link.style.top = '10px'; link.style.right = '10px'; link.style.backgroundColor = '#c00'; link.style.color = '#fff'; link.style.padding = '8px 12px'; link.style.borderRadius = '8px'; link.style.fontWeight = 'bold'; link.style.zIndex = '9999'; link.style.textDecoration = 'none'; link.style.boxShadow = '0 2px 6px rgba(0,0,0,0.3)'; // Insert into body document.body.appendChild(link); console.log('[ReportAbuseLink] Floating button inserted.'); });