Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

User talk:Writ Keeper/Scripts/googleTitle.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
<User talk:Writ Keeper

Legacy JavaScript

[edit]

Hello! This script has been detected as using deprecated parameters that need to be replaced with the updated version. Examples includeaddOnloadHook( ... ) needs to be replaced with$( ... ) or$( function() { ... } ) (depending on use); all wgGlobalVariables need to be properly gotten withmw.config.get( 'wgGlobalVariable' ); andaddPortletLink needs to be called withmw.util.addPortletLink. Please seeMW:ResourceLoader/Legacy JavaScript for details. Thank you. —{{U|Technical 13}}(etc)22:32, 19 January 2015 (UTC)[reply]

search

[edit]

I find it weird that it searchedtitle page + Wikipedia.org.
Just change

searchNode.href="http://www.google.com/search?q="+encodeURIComponent(subjectName.replace(/_/g," "))+"+-wikipedia.org";

to

searchNode.href="http://www.google.com/search?q="+encodeURIComponent(subjectName.replace(/_/g," "));

for it just to search the title page.NikolaiHo01:44, 8 September 2016 (UTC)[reply]

suggestion: add space(s) before "Google Search"

[edit]

HiWrit Keeper! I just "installed" your script for the first time. Definitely neat and I can imagine it saving time in the future.

I just had one suggestion: can you add some whitespace before "Google Search"? Currently, it gets scrunched up right next to the title. If you prefer to leave it as-is, do you mind if Ifork the script? Thanks, =paul2520 (talk)02:57, 29 November 2017 (UTC)[reply]

Thanks for the quick response! Looks great. =paul2520 (talk)12:50, 29 November 2017 (UTC)[reply]
No problem! Happy to help.Writ Keeper 14:30, 29 November 2017 (UTC)[reply]

Apostrophe

[edit]

HiWrit Keeper. Thank you for the many useful scripts you have made for the community! If an article title contains an apostrophe' as in e.g.Babette's Feast, the string will be stripped for anything after the apostrophe and the search will be forBabette only. Could you fix that, please?SamSailor10:05, 9 January 2018 (UTC)[reply]

@Sam Sailor: Nice catch, thanks! Should be fixed now.Writ Keeper 14:29, 9 January 2018 (UTC)[reply]
And it works! Thank you so much for the quick fix.SamSailor19:03, 9 January 2018 (UTC)[reply]
Retrieved from "https://en.wikipedia.org/w/index.php?title=User_talk:Writ_Keeper/Scripts/googleTitle.js&oldid=1139293126"

[8]ページ先頭

©2009-2025 Movatter.jp