MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
AdminIsidore (talk | contribs) No edit summary |
AdminIsidore (talk | contribs) No edit summary |
||
Line 22: | Line 22: | ||
} | } | ||
// Run on | // Appends the SVG filter needed for the wavy edge effect | ||
$(document).ready(resizeParchments); | function addParchmentFilter() { | ||
var svgFilter = '<svg style="position:absolute; height:0; width:0;">' + | |||
'<filter id="wavy2">' + | |||
'<feTurbulence x="0" y="0" baseFrequency="0.015" numOctaves="5" seed="1" />' + | |||
'<feDisplacementMap in="SourceGraphic" scale="15" />' + | |||
'</filter>' + | |||
'</svg>'; | |||
$('body').append(svgFilter); | |||
} | |||
// Run functions on page load and resize | |||
$(document).ready(function() { | |||
addParchmentFilter(); | |||
resizeParchments(); | |||
}); | |||
$(window).on('resize', resizeParchments); | $(window).on('resize', resizeParchments); |