/** * 11:36, October 16, 2013 (UTC) * External images loader * Enables Usage of images from other sites * * @author: UltimateSupreme () * @License: CC-BY-SA - */ // jQuery(function ($) {'use strict'; // Look for $('.WikiaArticle .user-image-hotlink, #mw-content-text .user-image-hotlink').each(function () { var $this = $(this), w = $this.data('width'), h = $this.data('height'), alt = $this.data('alt'), align = $this.data('align') || 'left', caption = $this.data('caption'), href = $this.text(), link = $this.data('link') || href, $figure = $(''); if (!href) { return; } $figure.addClass('thumb t' + align + ' thumbinner') .find('a').attr('href',
| Attributes | Values |
|---|
| rdfs:label
| - ExternalImageLoader/code.js
|
| rdfs:comment
| - /** * 11:36, October 16, 2013 (UTC) * External images loader * Enables Usage of images from other sites * * @author: UltimateSupreme () * @License: CC-BY-SA - */ // jQuery(function ($) {'use strict'; // Look for $('.WikiaArticle .user-image-hotlink, #mw-content-text .user-image-hotlink').each(function () { var $this = $(this), w = $this.data('width'), h = $this.data('height'), alt = $this.data('alt'), align = $this.data('align') || 'left', caption = $this.data('caption'), href = $this.text(), link = $this.data('link') || href, $figure = $(''); if (!href) { return; } $figure.addClass('thumb t' + align + ' thumbinner') .find('a').attr('href',
|
| dcterms:subject
| |
| abstract
| - /** * 11:36, October 16, 2013 (UTC) * External images loader * Enables Usage of images from other sites * * @author: UltimateSupreme () * @License: CC-BY-SA - */ // jQuery(function ($) {'use strict'; // Look for $('.WikiaArticle .user-image-hotlink, #mw-content-text .user-image-hotlink').each(function () { var $this = $(this), w = $this.data('width'), h = $this.data('height'), alt = $this.data('alt'), align = $this.data('align') || 'left', caption = $this.data('caption'), href = $this.text(), link = $this.data('link') || href, $figure = $(''); if (!href) { return; } $figure.addClass('thumb t' + align + ' thumbinner') .find('a').attr('href', link).addClass('image') .find('img').attr('src', href); if (alt) { $figure.find('img').attr({'alt': alt, 'title': alt}); } if (w) { $figure.find('img').attr('width', +w); } if (h) { $figure.find('img').attr('height', +h); } if (caption) { if (w) { $figure.width(+w + 2); } $figure.find('figcaption').text(caption); } $this.replaceWith($figure); }); }); //
|