Welcome to my talkpage! You can leave me a message about anything regarding the wiki, my scripts on it or general Fandom development here.

Messages left here will be answered to on your own talkpage. This is so you receive a talkpage notification when I reply to you.

Archives: 1234

Creating a script

Hi KockaAdmiralac: I was just wondering... How would one create a .js script? I thought that if it's relatively simple, perhaps I could tackle it myself. Thanks for your time! I know this may seem like a dumb question, and you totally don't have to answer it if you'd rather not. ;)

J.S. Clingman Fëalórin, A Child of Him whose love never fails.]]

23:03, January 9, 2019 (UTC)

Thanks for that information, KockaAdmiralac! My co-administrator and I used the SnowStorm script on our wiki as a part of our Christmas theme, and I was just thinking how wonderful it would be if I could modify the SnowStorm script so that the snow is replaced with fireflies, flashing on and off (for a summer theme!). Do you think that possible? Thanks to the info you gave me, I'll now be able to check out the SnowStorm script page to see whether I can make it work. Thank you! :)

J.S. Clingman Fëalórin, A Child of Him whose love never fails.]]

00:21, January 10, 2019 (UTC)

Untitled

Ola. I am new to this wiki, And I do not know where to get started. Can you please show me how to be a good dev and show me how to use Media Wiki and CSS, please and wiki codes and templates.


Thanks


RedLavaCat (Talk) (Profile) (Date) 00:09, January 12, 2019 (UTC)

Meida Wiki

Is Media Wiki stuff allowed here —Preceding unsigned comment added by RedLavaCat (talkcontribs) . Please sign your posts with ~~~~!

Re: ContentToggle

Thank you for the heads up! I am the original author of the script. It was posted on here since it was used by a few different wikis I was working on at the time (pretty small ones, I'm not sure if any of them are still active), so I got tired of copy and pasting it every time. I didn't realize documentation was required, so I didn't add any at the time.

I don't recall a lot of details about the script, but I can look into it. I think I may have created it to get around some bugs custom collapsibles had when toggling between multiple images. Since I'm not sure if any of the wikis using it are still active, what do I need to do to avoid it being deleted? I don't want to break any of them if they are active. {{SUBST:User:Paleclaw/Sig|09:27,1/15/2019}}

After looking through my wiki activity, it looks like it's only used on two sister wikis, both inactive. It was intended for several different ones, but as far as I can tell, nobody ever got around to updating the toggle templates to use this version instead of custom collapsibles. An example of the functionality of the script and associated template can be seen here. It does in fact look like I made it to fix the bugs custom collapsibles had with toggling between multiple items. If need be, it can safely be deleted since it's only used on two inactive wikis that can easily be edited to have the script on-wiki instead of it being imported from here. {{SUBST:User:Paleclaw/Sig|03:40,1/16/2019}}

By "custom collapsibles", do you mean mw-collapse, or something else? And if its mw-collapse, have you tried reporting said bug to staff? --Sharkie 04:02, January 16, 2019 (UTC)

How to Add Global JS Stuff

hi how do i add the global quickdiff thing to my global js page

pulled by a lemon (talk) 02:51, January 24, 2019 (UTC)

nevermind how do i change my preferences to enable personal JAvaScript

pull_lemons 03:12, January 24, 2019 (UTC)

WLH on redirect pages scriptlet

Hey, I need some advice. I came up with this idea of adding a WhatLinksHere link on redirect pages, either below or to the side of the redirect link... The idea behind this is to encourage users to check WLH before making changes to redirects. I think this could be rather useful on some wikis and probably warrants placement somewhere on Dev, but I'm not sure where it should go... It's just a small function, so I'm not sure if it deserves its own page, or should just go in the JavaScript Cookbook. Could you help me out with that?

Here is the scriptlet for reference:

// Add WhatLinksHere on redirect pages:
(function ($) {
    $('.redirectText').append('<br/><span id="redirectWLH">→ <a class="redirectWLH-link" href="/wiki/Special:WhatLinksHere/'
        + mw.config.get('wgPageName')
        + '">Links pointing to this redirect</a></span>');
    $('.redirectMsg img').attr('src', 'https://images.wikia.nocookie.net/dev/images/a/aa/Redirectltr-inverted.png');
})(jQuery);

I have separate CSS that goes with it, but it could be easily be placed in the js (with mw.config.addCSS for example) to simplify matters:

/* WhatLinksHere on redirect pages */
.redirectText li a { margin-left: -5px }
#redirectWLH { margin-left: 44px }
.redirectWLH-link {
    font-size  : 13px;
    font-weight: bold;
    margin-left: 5px ;
}

Here are a couple of examples of what it looks like when applied: w:c:courage:File:RedirectWLH.png, w:c:adventuretime:File:Whatlinkshere3.png

I don't know whether they should be combined and left as a scriptlet on the cookbook page, or kept separate and have its own page or something.

I'm also wondering if you possibly have any input on whether it should be beside or below the redirect link (or if maybe an option should be made for that), as well as whether this even needs to be done in JS in the first place (I can't think of any way to do it fully in CSS with :after and/or content:"").

Thanks —RyaNayR (talkcontribs) 00:37, January 26, 2019 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.