MediaWiki talk:Gadget-extlinks.js

Latest comment: 7 years ago by Pi zero in topic Hostname Portability

Hostname Portability edit

Using window.location.hostname instead of defining the hostname used in the check on line 12 will allow this gadget to be loaded as a user script on other wikis. Jkmartindale (talk) 09:35, 21 November 2016 (UTC)Reply

@Jkmartindale: I see the same gadget (without the futile surrounding try block) occurs on en.wb with "wikinews" replaced by "wikibooks" [okay, the shoe is on the other foot, this is a modified copy of that]. What you describe... seems like it ought to work. I'm not sure off hand how to test whether it works, since it's in a redundancy check I'm not sure how to trigger. I'll try it; doesn't seem very mission-critical, can just revert if there's a problem. --Pi zero (talk) 12:23, 21 November 2016 (UTC)Reply
@Pi zero: English Wikipedia uses version 5 of mw:Snippets/Open_external_links_in_new_window, if you want to try something that's probably been tested more. I didn't find this until a few minutes after I spammed here. James Martindale (talk) 12:28, 21 November 2016 (UTC)Reply
@Jkmartindale: Wikinews exists in a sort of licensing bubble within the sisterhood: it's fine to copy stuff from here to Wikipedia (with credit given), but it's copyvio to copy stuff from Wikipedia (or any other non-Wikinews sister I know of, even with credit given). Making it better to minimize what we import in the way of infrastructure; some bits of infrastructure have been copied from elsewhere over the years, sometimes with the (explicit or implicit) argument that it isn't nontrivial enough for copyright to apply, sometimes with a note that it's under some non-default copyright (which always makes me nervous). I see it as a real advantage, though, that I'm developing wikidialog here, because once developed here it can be ported to any other project in the sisterhood without impediment. --Pi zero (talk) 13:01, 21 November 2016 (UTC)Reply
Return to "Gadget-extlinks.js" page.