Fandom Developers Wiki
Register
Tag: rte-source
Tag: rte-source
Line 190: Line 190:
 
::You could use JS and CSS to do it. For the first one do <code>if (!<namespaces>) { mw.util.addCSS('#refpopupsettings {display:none;}'); }</code> and for the second one <code>if (!<refpopups>) { mw.util.addCSS('#refpopupsettings {display:none;}'); }</code>. Or you could hide them everywhere via site css then show them when you want them. --'''[[User:Sophiedp|Sop]][[User talk:Sophiedp|hie]]''' 02:09, June 22, 2017 (UTC)
 
::You could use JS and CSS to do it. For the first one do <code>if (!<namespaces>) { mw.util.addCSS('#refpopupsettings {display:none;}'); }</code> and for the second one <code>if (!<refpopups>) { mw.util.addCSS('#refpopupsettings {display:none;}'); }</code>. Or you could hide them everywhere via site css then show them when you want them. --'''[[User:Sophiedp|Sop]][[User talk:Sophiedp|hie]]''' 02:09, June 22, 2017 (UTC)
   
:::I found a pure CSS solution for the first. I'll give the second a try, though I still think it's a good idea for the script here to support these options. [[User:DEmersonJMFM|DEmersonJMFM]] 15:30, June 22, 2017 (UTC)
+
:::I found a pure CSS solution for the first a while back. I'll give the second a try, though I still think it's a good idea for the script here to support these options. [[User:DEmersonJMFM|DEmersonJMFM]] 15:30, June 22, 2017 (UTC)

Revision as of 15:30, 22 June 2017

Colors

Your TODO says you want to fine-tune the colors a little more. Can I interest you in my Colors library? -- pecoes 11:36, November 03, 2012 (UTC)

Pop-up disappear speed

Is there any way you can make the pop-ups disappear faster? They seem to take too long to disappear, and sometimes they take almost an entire minute to disappear after you stop hovering over them.

Is there any way to change how long it takes for the window to disappear, as sometime it disappears quickly and other times it take minutes to disappear?  Rocketslime_1_1  Talk  Wall  Contribs  21:27,11/12/2012 

They disappear using the same hover delay setting that creates them, but they only disappear after having been interacted with. You need to hover your mouse over the popup's body then hover out of it to trigger the close timeout otherwise it will stick open. This is intentional. Lunarity 00:59, November 13, 2012 (UTC)
I've made it configurable now. Just open the popup settings and untick "Use sticky hovering". Lunarity 02:38, November 13, 2012 (UTC)
Thanks, that makes it much better. Though for some reason when the popup goes above the reference the arrow underneath it works right, but the rest of the box is quite a few pixels too high.  Rocketslime_1_1  Talk  Wall  Contribs  22:06,11/13/2012 
Unfortunately, that was a bug I introduced while trying to fix another one; I thought I fixed it already (Try a Ctrl+F5). The problem causing that is that the popup has the WikiaArticle CSS class applied to it, which it needs because it's attached to
  1. WikiaMainContent, not
  2. mw-content-text, and only stuff which is descended from a .WikiaArticle gets bold, italics, underline, list items, etc. If your wiki has custom CSS on .WikiaArticle then it may interfere with the popup and screw up the height on it. I've made the unset CSS more robust, let me know if it's still happening (I'd like a link to an example page if possible, so I check the CSS cascade that's causing it). Lunarity 04:31, November 14, 2012 (UTC)
It isn't working. Here is a link to an effected page: http://nintendo.wikia.com/wiki/SSB4
 Rocketslime_1_1  Talk  Wall  Contribs  21:23,11/14/2012 

(Reset indent) What browser are you using? It's working correctly (on that page) for me in Firefox 16, Chrome 22 and Internet Explorer 9. Can you give me a screenshot? Lunarity 06:14, November 15, 2012 (UTC)

I am using Firefox (I'm not sure what version, but a newer one). Here is a screenshot. File:Popup Error.png  Rocketslime_1_1  Talk  Wall  Contribs  03:15,11/17/2012 
I suspect the problem is what I mentioned before about .WikiaArticle, since it looks exactly the same as what I was seeing before I fixed it. The baffling part is that I have CSS that is supposed to fix it but your browser is apparently using the old stylesheet without the CSS reset code. I suspect the server has served you the old version of the sheet with a week/month/year expiry instead of 10 minutes during that time it was really flaky and broken. Clearing your cache should fix it. [Did you try testing with Chrome or Internet Explorer?]
In any case, I've inlined the CSS Reset into the JavaScript, hopefully that should fix it for you. Lunarity 04:57, November 17, 2012 (UTC)
It works in IE, but after doing the normal (F5) cache clear it still hasn't fixed.  Rocketslime_1_1  Talk  Wall  Contribs  18:27,11/18/2012 
Okay, so it is specific to your Firefox installation. You must be stuck with an old version of the JavaScript as well. There isn't anything I can do if your browser is refusing to update to the latest version of the code. Did you try using "Private Browsing" mode in Firefox? That disables the cache which will make it clearer if that is the problem.
I recommend you fully clear your cache as you're probably going to have problems with other scripts as well until you do. Hit Firefox > History > Clear Recent History. Change the "Time Range" drop list to "Everything" then expand the "Details" section and untick all the boxes except "Cache" then hit "Clear Now". After that, do an F5. If it's still doing it, repeat the clear cache steps, except the F5, exit Firefox, open it again then try it. Lunarity 22:31, November 18, 2012 (UTC)
I tried all of those things, but for some reason none of them worked.  Rocketslime_1_1  Talk  Wall  Contribs  02:12,11/20/2012 

(Reset indent) Other than that, there's Firefox > Options. Go "Advanced", change to "Network" and click the "Clear Now" button in the Cache section. Then refresh.

If that doesn't work either then I'm out of ideas. I still don't think there's anything wrong with the script itself since I'm using Firefox as well and it works fine for me. Lunarity 02:24, November 20, 2012 (UTC)

I was able to reproduce the problem on a different computer, I'm not sure why but there seems to be a random problem with processing min-height: auto; correctly, I've switched it to min-height: 0; instead. Hopefully that should fix it, it's rather inexplicable why this happened in the first place though. The docs for min-height say "auto" should behave the same as zero unless the element has "display: flex", which it doesn't (shouldn't)... Lunarity 02:41, November 20, 2012 (UTC)
It looks like the change you made worked. Thanks!  Rocketslime_1_1  Talk  Wall  Contribs  19:58,11/20/2012 

How to put on non-Wikia wiki?

I was looking to put this code on a non-wikia wiki to use for the pop-up template. So I was wondering how exactly do you add it to a non-wikia wiki?  Rocketslime_1_1  Talk  Wall  Contribs  01:17,12/9/2012 

I don't think you can. The code uses Wikia's MediaWiki modifications to function, including $.showModal, window.importArticle and direct calls to load.php?mode=articles. I could modify it to be less dependent on Wikia's features, but the configuration UI is largely unsalvageable, there is no hope for making that work without a major rewrite (which is currently prevented by the fact that jquery.ui.dialog doesn't work at all in Oasis without a custom stylesheet). The other problem is that this script depends on Pecoes' Colors script internally for the color calculations, and that also relies on Wikia's features and is especially dependent on Oasis.
Short version: You'd need to copy /code.js and /code.css, but you'd also need to make significant changes to the loader functions in /code.js, and you'd also need Colors/code.js which needs significant reworking to not be dependent on SASS as well. [The external Wiki will also need to be running MW1.18 or newer, mw.loader is not optional, being manually upgraded to jQuery 1.8.3 would be good idea as well].
OTOH, it would be possible to fork the code and remove most of the dependencies. I can do that for you if you'd like, it won't take too long as it's mainly a deletion-happy exercise, but you will need to write custom CSS on your wiki to style the popups manually as I will have to gut all the color logic. Lunarity 06:08, December 9, 2012 (UTC)
I've created a forked version that should work on non-Wikia wikis. User:Lunarity/ReferencePopups-ext.js
You will need that JavaScript file and ReferencePopups/code.css. Put the CSS file at MediaWiki:ReferencePopups.css on the target wiki [Or you can just paste the contents into your Common.css, whatever works].
The biggest limitation is that there is no configuration UI at all. It can still be configured, but only by JavaScript (manually putting your settings into window.localStorage by the browser's script console). Lunarity 06:45, December 9, 2012 (UTC)

Wordmark problem

Refpoperror

Popup disappears behind Wordmark

Hello, I've been using this RefPopup for a while now and really like it a lot. Thanks. Today I noticed a little problem though. Nothing big, but maybe worth noting... when the pop-up appears in front of the Wordmark the part that covers the wordmark disappears. Can this be fixed? -Zantam03 (Talk) 14:03, January 3, 2013 (UTC)

The problem is caused by z-indexing and CSS block stacking contexts. I can make it so the popup is on top of almost everything but that risks breaking other things in the CSS rules. The popup is currently descended from WikiaMainContent, I may be able to shift it up to WikiaPage or the body but I'm concerned that it will break the user's and Wikia's CSS rules by preventing some of the classes from applying properly. Lunarity 20:41, January 8, 2013 (UTC)
It seems that when a ref contains a '&' it won't pop-up, at least not on this page ---Zantam03 (Talk) 01:13, January 19, 2013 (UTC)
Ampersands are a special character in HTML and are not interpreted literally so it's being encoded by MediaWiki. For whatever reason, someone decided it would be a good idea to encode these as '.26' which is an invalid CSS class thrown into the middle of the id. I've added a workaround for this so it should work now. (The issue was caused by using ampersands in the name field of the refLunarity 17:01, January 19, 2013 (UTC)

Infobox Issues

Doesn't seem to work within our infoboxes, any way you can take a look and tell us what's broken?

Thanks!

Nathan (Peteparker) (Earth-1218) (talkcontribsemail) 05:08, May 14, 2013 (UTC)

Global.js

Will this work on global.js? {{SUBST:User:Lelouch Di Britannia/Sig}} 09:51, September 26, 2013 (UTC)

Why not? ~ UltimateSupreme 11:58, September 26, 2013 (UTC)
The article only mentioned "MediaWiki:Common.js". {{SUBST:User:Lelouch Di Britannia/Sig}} 12:04, September 26, 2013 (UTC)

Lockdown Mode

I tried to enable the lockdown mode on my wiki by copying-and-pasting the code provided with no luck. I tried placing both before and after script importing, cleared the cache, waited 10, 15 minutes but the code wouldn't take effect. After I removed it from my Common.js, the script almost instantly worked. Any ideas of the problem here? DEmersonJMFM 03:18, November 23, 2013 (UTC)

Colors

Is there any way I can change the color of the reference popup? I don't want to use the colors of theme of my wiki User:Relikz 4:27, January 26, 2014 (UTC)

Yes. Simply inspect the reference popup, and add the appropriate styles to the wiki's CSS. -452 (talk) 15:03, July 13, 2014 (UTC)

Suggestion

Suggestion: Allow popup references inside popup references, by attaching the handler to the popped-up reference. -452 (talk) 21:33, January 11, 2015 (UTC)

Suggestion: Make the bubble fade in instead. --The Lightning Pencil 13:18, January 18, 2015 (UTC)

"Configure Reference Popups" link not in Oasis?

Maybe it's just me, but I can't seem to find the "Configure Reference Popups" link in the Oasis skin. I checked below the categories and I can't find the link there. I have to switch to Monobook via ?useskin=monobook or the SkinSwitchButton tool. Can this be fixed so users not experienced with other skins can access this too? Thanks. --I am k6ka Talk to me! See what I have done 15:38, May 30, 2015 (UTC)

Here are two places the link is present in Oasis for me:
Configure reference popup link
-452 16:45, May 30, 2015 (UTC)
However, I agree that it should be easier to find, perhaps in the "My Tools" menu, or in the user dropdown, right below to "My Preferences". -452 16:48, May 30, 2015 (UTC)
Perhaps the wiki you're looking at has the "lockdown" setting enabled? This removes the link from below the categories - but the link in each popup should still be there. -452 16:51, May 30, 2015 (UTC)
I looked at ReferencePopups/demo, and the link below the categories doesn't appear in Oasis. However, when I switched to the Monobook skin, it appeared. Not sure if RefPopups on dev.wikia is on lockdown, or if the lockdown setting doesn't work for Monobook. --I am k6ka Talk to me! See what I have done 17:45, May 30, 2015 (UTC)
That's interesting, I can't figure out why the link appears for me but not for you. -452 18:00, May 30, 2015 (UTC)
Okay, hmm... I installed the gadget in my personal JS file on one of my wikis and the link appeared. Dunno why it doesn't appear here though. The "Categories" box does overlap the link annoyingly... maybe that can be fixed? --I am k6ka Talk to me! See what I have done 18:11, May 30, 2015 (UTC)
...kinda forget what I said above. The link appears on some pages, but not all. It doesn't seem to appear in the article namespace, but oddly it does appear in the project namespace. --I am k6ka Talk to me! See what I have done 18:28, May 30, 2015 (UTC)
I have the script installed site-wide and the "Configure Reference Popups" link isn't shown in the main namespace for me, but I do, as K6ka noted, see it in the Project namespace. This, however, doesn't hurt my feelings as I thought its present location was a bad location for the link (My Tools is my preference) and considered removing it anyway. DEmersonJMFM 03:30, July 10, 2015 (UTC)
This is a bit late, but I actually found out the cause for this a good while ago. Apparently it has something to do with Wikia's "Add category" feature, which can be disabled in Special:Preferences. Having that enabled interfered with the "Configure Reference Popups" button. I disabled Wikia's category module for HotCat and the link now appears just fine. —k6ka 🍁 (Talk · Contributions) 02:25, March 21, 2016 (UTC)
This issue orcurs because the WikiaArticleCategories element which script try to insert the link doesn't exist. I make a minor fix for this problem. Hope Wikia staff don't suddenly change their class/id of any element. Dai ca superman (talk) 04:06, October 22, 2016 (UTC)

Translation

Hello. Excuse me, but would you please add Japanese translation?

[[ReferencePopups/code.js]]
ja: {
            coreConfigureText: '注釈ふきだしの設定',
            coreConfigureHover: '注釈ふきだしの設定を変更する'
        },

[[ReferencePopups/code.configure.js]]
ja: {
			confTitle: '注釈ふきだしの設定',
			confReenableHelp: '注釈ふきだしを無効にした場合、ページ下部のカテゴリ欄付近にある「注釈ふきだしの設定」をクリックすれば再設定できます。',
			confDisable: '注釈ふきだしを無効にする',
			confEnable: '注釈ふきだしを有効にする',
			confLockdown: '[ロック]',
			confLockdownMsg: 'このウィキは常に注釈ふきだしが有効になるよう設定されています。',
			confActivateDelay: '表示までの時間:',
			confMilliseconds: 'ミリ秒 (ms)',
			confHoverSticky: 'マウスポインターが触れるまで表示',
			confActivateDelayInstant: 'すぐに',
			confActivateDelayNormal: 'ふつう',
			confActivateDelaySlow: 'ゆっくり',
			confActivateDelayLate: 'とてもゆっくり',
			confActivateBy: '表示方法:',
			confActivateByHover: 'ポインターを合わせる',
			confActivateByClick: 'クリックする',
			confEnableAnimations: 'アニメーション表示を有効にする:',
			confSaveButton: '保存',
			confCancelButton: '取り消し'
		},

Thanks, Plover-Y (talk) 2015-08-10 08:26 (UTC)

Can non admins use this?

I tried using this on a wiki that I'm not an admin on, and tried to put the code on:

http://fairytailfanon.wikia.com/wiki/User:SecretWielder/common.js

http://fairytailfanon.wikia.com/wiki/Template:SWdropdown

http://fairytailfanon.wikia.com/wiki/Template:SWdropdownContent

And I couldn't get the Popups to work. Is their something I did wrong, or can non-admins not use this? 

Bug: not working when parameter "name" has ":"

Hello. I think I found a bug with this script: when the parameter "name" in the reference (<ref name="something"/>)includes a colon (:), the popup doesn't appear. I assume this isn't a big deal in most cases, but in the Attack on Titan Wiki we have a template to make quick references and it provides automatic merging of references by setting as "name" the same text of the reference; hence if the text includes a ":", the popup will not work. I looked at the code of the script in the hopes of finding the possible bug and then submit the fix to you, but... @_@ it surpasses my limited knowledge in JavaScript. Any idea about how to solve it? Thanks in advance.--Manuel de la Fuente (talk) 20:46, April 1, 2016 (UTC)

I saw that apparently this issue had already been detected, so I tried to solve it by replacing this line (877):
var $cite = $(frag.attr('href').replace(/\./g, '\\.'));
With this:
var $cite = $(frag.attr('href').replace(/\.|:/g, '\\.'));
But it didn't work. :(
I was testing it in a sandbox here: 1, 2.
--Manuel de la Fuente (talk) 21:48, April 1, 2016 (UTC)

Parameter for Limiting Configuration Link

Can someone add a parameter that will allow us to specify which namespaces we would like to at least see the configuration link? Or perhaps even better a limitation for the configuration link to only show on pages that actually have references? Personally, I don't like seeing it on file pages, categories, main page, etc. DEmersonJMFM 15:35, November 6, 2016 (UTC)

I'm still very interested, especially in the latter option. DEmersonJMFM 01:00, June 22, 2017 (UTC)
You could use JS and CSS to do it. For the first one do if (!<namespaces>) { mw.util.addCSS('#refpopupsettings {display:none;}'); } and for the second one if (!<refpopups>) { mw.util.addCSS('#refpopupsettings {display:none;}'); }. Or you could hide them everywhere via site css then show them when you want them. --Sophie 02:09, June 22, 2017 (UTC)
I found a pure CSS solution for the first a while back. I'll give the second a try, though I still think it's a good idea for the script here to support these options. DEmersonJMFM 15:30, June 22, 2017 (UTC)