Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Implementation for source editing mode  
3 comments  




2 Feature request  
4 comments  




3 "ISBN" article links in refs  
1 comment  




4 Request or suggestion  
3 comments  




5 Suggestion  
1 comment  




6 Not working?  
1 comment  




7 Query about odd glitch  
5 comments  




8 Interface-protected edit request on 5 July 2022  
6 comments  




9 glitch?  
2 comments  




10 Script detecting multiple "Citation needed" and other similar tags as duplicate links  
1 comment  




11 No install button?  
1 comment  




12 Update for mw:Heading HTML changes  
2 comments  













User talk:Evad37/duplinks-alt.js




Page contents not supported in other languages.  









User page
Talk
 

















Read
Edit
Add topic
View history
 








Tools
   


Actions  



Read
Edit
Add topic
View history
 




General  



What links here
Related changes
User contributions
User logs
View user groups
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

< User talk:Evad37

Implementation for source editing mode[edit]

I didn't realize that this script, and the original, only work in the VisualEditor until I read a a post on the talk page to the original script. I don’t use the VisualEditor. Would it be possible to implement source editor support for this? I think this script is extremely useful, but I can’t use it since I only edit using the source editor. Interqwark talk contribs 02:27, 17 June 2018 (UTC)[reply]

I don't know what you mean, these scripts have existed since before VisualEditor was even invented - Evad37 [talk] 05:54, 17 June 2018 (UTC)[reply]
As it's long after this was posted, possibly not of great use to the original questioner, but probably worth putting on record. Last year, without having seen this earlier discussion, I described the usefulness of this script with the Visual Editor on the user page; it is much easier to remove duplicates this way than in edit mode. So, even if Interqwark uses the source editor for most purposes, it's worth using the visual editor for finding and fixing duplicate links.

There is one issue, either a quirk (if it can't be fixed) or a bug (if it can): when used with the visual editor, removing any link within a paragraph removes the highlight on all other duplicates within that paragraph. Not a major issue, either remember all the links in a paragraph, or repeat the highlighting, but if it is easily fixed, I'd suggest that it's worth it. Best wishes, Pol098 (talk) 10:29, 18 September 2020 (UTC)[reply]

Feature request[edit]

Is there any way to set it so that it automatically runs when you load a page in mainspace, rather than needing to hit the button? I'll draft a line of code in a second, but I was wondering if that were a possibility to be included. Thanks, --DannyS712 (talk) 03:14, 29 January 2019 (UTC)[reply]

@Evad37: Like:

if (mw.config.get( 'wgNamespaceNumber' ) == 0) run();

else var portletlink = mw.util.addPortletLink('p-tb', '#', 'Highlight duplicate links', 'ca-findduplicatelinks');

Thoughts? --DannyS712 (talk) 03:18, 29 January 2019 (UTC)[reply]
This should be possible to do as an option. I've got a few other script things I'm working on at the moment, so I'm not sure when I'll get around to it. - Evad37 [talk] 00:27, 7 February 2019 (UTC)[reply]
@Evad37 I've implemented this in User:Aaron Liu/sandbox.js. What do you think? Note that I made it so there's no toast (mw.notify) if the option to automatically highlight them is enabled. Should I change the option name for highlighting duplinks? It's currently autoDuplinks. Note that I've also replaced most vars with letsAaron Liu (talk) 21:19, 27 December 2023 (UTC)[reply]

"ISBN" article links in refs[edit]

This tool detects links to the article ISBN in references as duplicates. Personally I would prefer if only the first entry in a reference list linked to that article, but it might be easier for now if the tool were configured to ignore links to ISBN within <ref> tags, perhaps. —Hugh (talk) 03:34, 14 February 2019 (UTC)[reply]

Request or suggestion[edit]

This tool shows duplicate links in a box. However, I would suggest or request that is there any way to highlight the duplicate links with yellow background while the first link with orange background. I think highlighting the links is far better than showing them in a box. Thank you. Empire AS Talk! 13:51, 8 August 2020 (UTC)[reply]

@Empire AS: You can add custom styles to your common.css page, using like the following:
.duplicated-link { background:orange; border:0; }
.duplicate-link { background:yellow; border:0; }
The colour names orange and yellow can replace with any Web color name (or hex triplet). - Evad37 [talk] 08:04, 28 August 2020 (UTC)[reply]
Evad37, Thank you.Empire AS Talk! 08:07, 28 August 2020 (UTC)[reply]

Suggestion[edit]

Hello! So my suggestion is to have the tool ignore {{citation needed}} templates. These usually aren't something where removing the duplicate link would need to be done (unless of course there's a lot of that template in the article in which case it just gets replaced with a maintenance template), and also removing the duplicate link from the template requires actually removing the template (unless there's a parameter which disables the link to the template that I"m not aware of). An example of this is on Mannheim Steamroller. ― Blaze The WolfTalkBlaze Wolf#6545 19:10, 1 November 2021 (UTC)[reply]

Not working?[edit]

Hello there @Evad37, I'm trying to use your script here, but not sure it's actually working the way it should. Every single thing which is linked has a box around it. So, I'm not sure why it is highlighting every single link instead of the repeated links? Coldstreamer20 (talk) 17:18, 16 December 2021 (UTC)[reply]

Query about odd glitch[edit]

G'day Evad37. Weird glitch with the script. It was working ok yesterday, but today when I click on it, it highlights ALL the links in the lead and repeats the lead and infobox below that. Each time I click on it it adds another lead and infobox... Very strange... On Uskok--class torpedo boat. Peacemaker67 (click to talk to me) 04:43, 25 June 2022 (UTC)[reply]

This has been happening to me as well. It seems to be particularly common on articles that have a topicon (Template:Good article, Template:Featured article, Template:Pp, etc.), although that might just be a coïncidence. Extraordinary Writ (talk) 07:38, 27 June 2022 (UTC)[reply]
Evad37 same here ... it is duplicating the entire lead. Like Extraordinary Writ says, happening on a featured article (Palladian architecture). SandyGeorgia (Talk) 14:11, 2 July 2022 (UTC)[reply]
I tested it at Palladian architecture, and as noted by Extraordinary Writ, the error seems to be coming from the Featured article template. [1] SandyGeorgia (Talk) 14:17, 2 July 2022 (UTC)[reply]
See query at Village pump (technical) SandyGeorgia (Talk) 04:01, 5 July 2022 (UTC)[reply]

Interface-protected edit request on 5 July 2022[edit]

This is regarding the issue reported in #Query about odd glitch above. Would an int-admin be kind enough to make the fix suggested by NguoiDungKhongDinhDanh at Wikipedia:Village pump (technical)#Glitches on Featured and good articles when using scripts? Evad37 hasn't edited in several months, so it doesn't look like he'll be able to fix this anytime soon: this is a widely used script, so it'd be good to get this taken care of. Thanks in advance! Extraordinary Writ (talk) 05:06, 5 July 2022 (UTC)[reply]

 On hold giving @Evad37: a chance to look at their own script. — xaosflux Talk 13:20, 6 July 2022 (UTC)[reply]
Evad37 hasn't edited since January, so I don't think we'll be hearing from him anytime soon. Extraordinary Writ (talk) 03:00, 8 July 2022 (UTC)[reply]
 Donexaosflux Talk 00:12, 11 July 2022 (UTC)[reply]
And it seems to be working again—thank you Xaosflux! Extraordinary Writ (talk) 00:25, 11 July 2022 (UTC)[reply]
Yes! Thank you, SandyGeorgia (Talk) 00:32, 11 July 2022 (UTC)[reply]

glitch?[edit]

I'm trying to find some links that might be removed at Jack Smith (lawyer) and the script is telling me there are no duplicates, but I'm seeing at least two. Valereee (talk) 15:39, 21 November 2022 (UTC)[reply]

@Valereee: I confirm the script isn't working properly. SLBedit (talk) 16:10, 2 February 2023 (UTC)[reply]

Script detecting multiple "Citation needed" and other similar tags as duplicate links[edit]

Hi Evad37. If an article have multiple {{Citation needed}}, {{Better source needed}}, or other similar citation-related tags, the script detects them as duplicate links. Would you please fix/improve the script to ignore/bypass those tags? --Mann Mann (talk) 03:18, 9 May 2023 (UTC)[reply]

No install button?[edit]

Can we make this work with the gadget for installing scripts, which displays the blue install button, instead of having one to edit their js pages? Piotrus at Hanyang| reply here 04:02, 31 May 2024 (UTC)[reply]

As reported at Wikipedia:Village pump (technical)#Broken template in Vector 2010, this script does not work correctly following the MediaWiki changes described at mw:Heading HTML changes.

To fix it, it should be sufficient to replace this line:

if (this.nodeName.toLowerCase() == 'h2') {

with this:

if ( $(this).is('h2, .mw-heading2') ) {

I pinged the author, @Evad37, previously, but it seems they're not very active these days. Matma Rex talk 17:03, 18 June 2024 (UTC)[reply]

 Done (of course if Evad37 doesn't want this they can do as they please). — xaosflux Talk 18:07, 18 June 2024 (UTC)[reply]

Retrieved from "https://en.wikipedia.org/w/index.php?title=User_talk:Evad37/duplinks-alt.js&oldid=1229783341"





This page was last edited on 18 June 2024, at 18:07 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki