|
|
| (未显示1个用户的8个中间版本) |
| 第1行: |
第1行: |
| <script>
| |
| // <pre>
| |
| (function() {
| |
| var $window = $(window);
| |
| var loadingImage = "https://www.hmoegirl.com/images/2/28/Moehime.jpg";
| |
| $window.on('load.UserLinkAvatar', function() {
| |
| var images = [];
| |
| $('.mw-userlink:not(.user-avatar-added)').each(function() {
| |
| var item = $(this);
| |
| var src = mw.config.get("wgServer").replace("www.hmoegirl", "www.hmoegirl") + mw.config.get("wgScriptPath") + '/extensions/Avatar/avatar.php?user=' + encodeURIComponent(item.text());
| |
| var img = $('<img/>').on('error', function() {
| |
| window.setTimeout(function() {
| |
| img.attr('src','https://www.hmoegirl.com/images/2/28/Moehime.jpg') ;
| |
|
| |
| }, 0);
| |
| }).addClass('userlink-avatar-small').attr({
| |
| "data-src": src,
| |
| "src": loadingImage
| |
| });
| |
| images.push(img[0]);
| |
| var bigAvatar = $('<span/>').addClass('userlink-avatar');
| |
| item.prepend(bigAvatar.append(img));
| |
| item.addClass("user-avatar-added");
| |
| if (magnifierOn) {
| |
| var magnifierImg = $('<img/>', {
| |
| attr: {
| |
| "data-src": src,
| |
| "src": loadingImage
| |
| },
| |
| on: {
| |
| error: function() {
| |
| window.setTimeout(function() {
| |
| magnifierImg.closest('.userlink-avatar-large').remove();
| |
| }, 0);
| |
| }
| |
| }
| |
| });
| |
| images.push(magnifierImg[0]);
| |
| bigAvatar.on('click', function() {
| |
| window.open(mw.config.get("wgServer").replace("www.hmoegirl", "www.hmoegirl") + mw.config.get("wgScriptPath") + '/index.php?title=Special%3A查看头像&user=' + encodeURIComponent(item.text()), '_blank');
| |
| return false;
| |
| }).append($('<div/>', {
| |
| attr: {
| |
| class: 'userlink-avatar-large'
| |
| }
| |
| }).prepend(magnifierImg)).addClass('userlink-avatar-hover');
| |
| item.before(bigAvatar);
| |
| }
| |
| });
| |
| if (typeof window.lazyload === "function") {
| |
| lazyload(images);
| |
| } else {
| |
| images.forEach(function(ele) {
| |
| ele.src = ele.dataset.src;
| |
| });
| |
| }
| |
| });
| |
| $(function() {
| |
| $window.trigger("load.UserLinkAvatar");
| |
| });
| |
| })();
| |
| // </pre>
| |
| </script>
| |
| <style> | | <style> |
| .mw-body-content p { | | .mw-body-content p { |
| padding: 3px; | | padding: 3px; |
| text-align: center; | | text-align: center; |
| | } |
| | .mw-widget-dateInputWidget.oo-ui-widget-enabled .mw-widget-dateInputWidget-handle { |
| | font-size: 94%; |
| | } |
| | #contentSub, #contentSub2 { |
| | height: 45px; |
| | } |
| | table.wikitable { |
| | margin: auto; |
| } | | } |
| </style> | | </style> |