MediaWiki:Common.js: Difference between revisions
No edit summary |
Add desktop ad rail markup |
||
| Line 109: | Line 109: | ||
); | ); | ||
}); | }); | ||
/* BEGIN Gemini Station ad rail */ | |||
(function ($) { | |||
function addGeminiStationAdRail() { | |||
var content = document.getElementById("content"); | |||
if (!content || document.getElementById("gsw-ad-rail")) { | |||
return; | |||
} | |||
var rail = document.createElement("aside"); | |||
rail.id = "gsw-ad-rail"; | |||
rail.className = "noprint"; | |||
rail.setAttribute("aria-label", "Advertisement"); | |||
var slot = document.createElement("div"); | |||
slot.className = "gsw-ad-slot"; | |||
slot.setAttribute("data-ad-client", "ca-pub-3421922257616683"); | |||
var label = document.createElement("div"); | |||
label.className = "gsw-ad-label"; | |||
label.textContent = "Advertisement"; | |||
slot.appendChild(label); | |||
rail.appendChild(slot); | |||
content.parentNode.insertBefore(rail, content.nextSibling); | |||
} | |||
$(addGeminiStationAdRail); | |||
}(jQuery)); | |||
/* END Gemini Station ad rail */ | |||