Talk:LastEdited

expanding
Is there any way that this could be expanded so that it works on all pages, not just pages in the article namespace? -- Rider ranger47  21:00, October 15, 2014 (UTC)


 * The script was designed for the main namespace, since those changes require more of a review. Anyway, it's in the current to-do list, so I'll be working on it. --  sqm talk 09:17, 11.15.2014


 * Seconded! I would love it if this worked in every namespace. Perhaps it can be a variable that we set locally, similar to how we specify the pages upon which AjaxRefresh works. Thanks! :) — Spike  Toronto  02:49, November 28, 2014 (UTC)


 * I've updated the script so that it works for most namespaces. But, I've omitted the positioning since it would be too much of a hassle to do that for all namespaces. --  sqm talk 09:13, 12.01.2014


 * Wow! Thanks! :) — Spike  Toronto  07:46, December 2, 2014 (UTC)

Editor avatar
Hi. Thanks for making this. Can this script also display the avatar of this last editor for styling purpose? Reasno 23:23, December 18, 2014 (UTC)


 * That should be possible. I'll be working on it. --  sqm talk 01:55, 12.19.2014
 * Done and done. --  sqm talk 13:05, 12.30.2014


 * Loving this update so far. However, this seems to be breaking on one of my wikis. The avatar image seems to have an additional  tag, which doesn't have a closing quote, nullifying the width/height, and showing the image at it's full height of 150 (NOTE: I currently added a width/height of 19 to the CSS class, so you'll have to inspect the element to see it). Also, I'm also getting an error on multiple wikis that use this that anon edits no longer show up; I believe it's in response to this error (page): jquery,mediawiki:128 - GET - http://transformice.wikia.com/wiki/User:182.18.225.192 - 404 (Not Found) My guess is it's because you have all your code inside the callback from checking the userpage, and when it doesn't exist the script never fires? Sorry for being a trouble maker, and thanks for the wonderful script. (Also, does it currently work on the new proposed wikia article layout at all?)  EDIT: I'm at work so both of these have been happening on a mac with Chrome (up-to-date) and Safari.


 * Right, I forgot about user pages that don't exist. I'll implement that when I can. For the itemprop thing, I think I'll add filters to slice out the image url. And no, this script was not designed for the new layout and may or may not work with it; I have yet to test that. --  sqm talk 16:52, 12.30.2014


 * What’s the benefit of showing the avatar? This is just supposed to be a “snapshot” of the last entry in the revision history, and we do not display avatars there. Frankly, I think it makes the LastEdited entry at the top of the page too instrusive and conspicuous. Is there some sort of JS statement we can wrap the import in that will locally disable displaying the avatar? Thanks! :) — Spike  Toronto  17:22, December 30, 2014 (UTC)

The feature was asked for, and could be disabled with the  object. See lastEdited. --  sqm talk 18:53, 12.30.2014


 * ✅ Done with this edit: http://sp.wikia.com/?diff=1665587 Thanks! :) — Spike  Toronto  06:30, December 31, 2014 (UTC)


 * I personally like it as I often recognize an avatar before a username. Plus it helps make the editor feel "special" since there avatar makes their name a bit more noticeable.
 * (Edit) I do agree it's a little intrusive though, maybe the default size should be something more like 15x15px? I know I can change it for my needs with CSS, but 19 seems a little large for the default, considering the height of .lastEdited class is 14px or so on chrome without the avatar, with 12px font.


 * Fixed the issue. The avatar should appear fine now, but if it doesn't, feel free to report back. 19x19px is the preferred icon size, and is suitable for inline icons. Though, I've changed the size to 15x15px, I'll change it back if the icon appears a bit too small to recognize. --  sqm talk 11:52, 01.02.2015

And thanks for lowering the image size; if you do choose to enlarge it I can always shrink it myself, but I do prefer it as default, so thanks.
 * Having a few more (new) avatar issues, now mostly with anon ones, although the core issue seems to be on all of them. I'm getting (link)(link) on all avatars, but while user avatars are saved by the width, anon avatars seem to also have  (link [this wiki still uses CSS to fix the sizing bug, but you can see the html])(link [Edit: This one uses CSS also now.]) instead of the width. Getting this on Firefox (latest) and IE 11.
 * Wow, my request has been fulfilled. Thanks! Reasno 03:04, January 8, 2015 (UTC)

Disable on page / namespace
Since you're already checking namespaces / page titles, could you please add support for disabling the script on select pages / namespaces? I don't personally need it for a namespace (but figured it would be a nice option), but would like the option to disable it on the main page (and I could imagine some wiki's wouldn't want it on portal pages). Thanks for your time,


 * The current namespace support is not really optimal, and I'm working for a better one. I'll make sure to add that exclusion feature with the next update. --  sqm talk 13:05, 12.30.2014


 * Thanks for the quick reply, and I'll look forward to it :) Will your rework also test for custom namespaces? (unless it does already and I'm not noticing).


 * No, this script doesn't work on custom namespaces. Basically, the whole function fires only if the namespace number is smaller than 112 (since most namespaces that require review fit to that limit), and most custom namespaces have namespace numbers above 500 iirc. I'll fix that too with the next update. Thanks again. --  sqm talk 16:52, 12.30.2014


 * These planned namespace changes sound great. Thanks! — Spike  Toronto  17:24, December 30, 2014 (UTC)

Cursor:pointer; and Multiple imports?
Since the "diff" link doesn't have an href, some "link" behaviors aren't done on some browsers, such as  (sorry for being so anal >.<). I prefer no href so it doesn't add "#" to the url, just letting you know it might need some additional css because of it.

Also, does this scripts consider the possibility of a wiki using this as well as an editor using it for personal use, both at the same time? I tried injecting the script onto a page already using it through the web console, and it duplicated the information.


 * Added both changes. And no, you're not being annoying. On the contrary, it is users like yourself that help in fixing issues which otherwise go unnoticed. Thanks for all the reports and suggestions! --  sqm talk 11:52, 01.02.2015

No link for users
While anonymous edit's still work as expected, when the last edit was by a valid user, the link disappears, and the space between the name and avatar disappears (link).
 * It seems extracting the avatar from profiles was the cause of this. My guess would be the differing URL lengths of the avatar for each user. Anyway, I've removed the feature for now. It won't be added until I figure out a better method for getting user avatars. --  sqm  |  talk  | 12:41, 01.25.2015
 * Thanks, not having that link was frustrating. Also, instead of waiting for the avatar to load, couldn't you just add an empty span with an id/class that you could load it into after you've retrieved the image url? Might prevent it from taking a few milliseconds longer for the rest of it to load.
 * The main issue here is not the time taken to load the avatar (a few milliseconds really don't matter, for me at least), but getting the avatar itself. Anyways, I'll add that when re-adding the avatar feature. --  sqm  |  talk  | 17:23, 01.25.2015

"Created page with"
I was also wondering if it might be a good idea to take any commit message that starts with "Created page with [stuff]" and just compress it down to "Created page"?
 * Done. --  sqm  |  talk  | 12:41, 01.25.2015
 * Thank you.

Highlighted user names
For some reason, my user name doesn't appear to be highlighted on the LastEdited addon if my user name has a space in it. It it possible to fix it? Other admins do got highlighted username. Bureaucrat of Happy Tree Friends. Yong Feng (Reply←→Edits) 20:07, February 26, 2015 (UTC)


 * Currently the space in your user name is replaced with  instead of  . You can adjust your css rules respectively or wait until a user with the codeeditor right replaces   with   (or adds code with the same effect). Arkondi (talk) 04:19, February 27, 2015 (UTC)


 * Fixed, thanks Arkondi. --  sqm  |  talk  | 08:55, 02.27.2015


 * Thanks guys. Yong Feng (Reply←→Edits) 11:23, February 27, 2015 (UTC)

timeago
How can I alter my set-up in Common.js so that the last edit’s timestamp is expressed correctly and not as processed by timeago? Thanks! :) — Spike  Toronto  03:08, April 5, 2015 (UTC)

P.S. Plus, it slows down page loads. — Spike  Toronto  04:29, April 5, 2015 (UTC)

 UPDATE : Thanks for making this optional! :) — Spike  Toronto  09:11, April 5, 2015 (UTC)


 * No problem. :) As for the lag, it was caused due to the time taken in obtaining the avatar. I've adjusted the requests a bit so that the script would get the avatar only when the avatar option is enabled and add it later to the details. This makes the script load faster on pages, so you should observe a boost in performance now. --  sqm  |  talk  | 09:15, 04.05.2015


 * Wow, it’s great! And, since we have the avatar option disabled at our wikia, it loads faster. Thanks again for the changes! :) — Spike  Toronto  09:37, April 5, 2015 (UTC)

Translation
Hi! Sqm-san annouced translations of this js to us. (Although I don't think Japanese translation is necessary >_<) // 日本語 (Japanese) ja: { lastEdited: '$1による編集 $2', comment: '編集内容の要約', size: '現在のサイズ', created: '新しいページ', loading: '直近の変更を確認する', changes: '変更点', link: 'リンク', undo: '取り消し, cancel: '戻る' } or... and (diff) is translated (差分) (= ) in Japanese. --Plover-Y (talk) 2015-04-06 09:44 (UTC)
 * undo: '',

+ fr, oc
Hi, here are French and Occitan translations.

—Hulothe 09:58, April 14, 2015 (UTC)


 * Added, thanks. --  sqm  |  talk  | 14:59, 04.14.2015

Excluding namespaces
How does one list namespaces to be excluded? Does each one require quotes around it? If we want to exclude the Project namespace, do we use Project, or the actual name of the Project namespace? Thanks! :) — Spike  Toronto  22:09, May 4, 2015 (UTC)

You can exclude namespaces by adding their appropriate id in the window.lastEdited object. A full list is given here. For instance, if you don't want the script to work on the Project and Forum namespaces (and their respective talkpages), the configuration would look something like this:
 * -- sqm  |  talk  | 04:32, 05.05.2015


 * Thanks! — Spike  Toronto  14:29, May 5, 2015 (UTC)

+ pt-br
Hello, here are portuguese of Brazil translation.

Cratera (talk) 17:44, May 8, 2015 (UTC)


 * Added, thanks. --  sqm  |  talk  | 17:51, 05.08.2015

toggle button
I have a suggestion. The nature of displaying the amount of information the script does can make the article header appear more cluttered. Wikia's recent changes to the header haven't really been helpful, but despite that, I think that adding a toggle button to expand and collapse the LastEdited details would be a nice visual improvement.

Hackey5 (talk) 08:43, May 9, 2015 (UTC)


 * I do agree the recent updates to the header made it appear more cluttered with the details. Though I don't see how adding a toggle button solve the issue. Having to expand something which requires to be viewed just once or twice is not really an optimal solution in this case. Could you perhaps elaborate how you want the details to be shown? --  sqm  |  talk  | 14:37, 05.10.2015


 * I know that editors who monitor article activity may prefer the article details' immediate visibility. However, for general editors and the majority of readers, who articles were last edited by is irrelevant information. This script primarily serves the purpose of an editing tool, so it should not interfere with article content unless summoned or contribute towards clutter. I have three suggestions:


 * Add a Details button next to the Edit/Talk buttons which can be clicked to quickly reveal the article details below the article header (where it is now).
 * Add a Details option to the Edit button's dropdown menu which does the same thing as described above.
 * Install a popover menu that then presents the article details by hovering over a small plus (+) icon positioned somewhere in the article header.
 * Any of these will improve the presentation of articles. Perhaps give coders the choice so they can decide what's best for their wiki. Also, can you please add more specific ID's or classes that can be manipulated, as the script element is extremely rigid right now. Thanks.
 * Hackey5 (talk) 16:53, August 8, 2015 (UTC)

Spanish translation error
Hello, I'm here to mention a translation error into Spanish of LastEdited, I will show only the erroneous parts.

As you can see, It is not "Editar resumen" in Spanish because that means edit literally the edit summary of a page, the correct translation is "Resumen de edición".  Electric Game  (Electric Game)  22:05, May 11, 2015 (UTC)
 * +1. --Benfutbol10 [TalkPetic. diseño ] 00:37, June 30, 2015 (UTC)
 * Corrected, thanks. --スリスト 16:17, 07.09.2015

Monobook
Hey, I was wondering if I could request monobook support? Should be as easy as appending it to a different element if (skin == "monobook"). Or at the least it seems simple to me, but I honestly have no clue. Thanks either way for your time!


 * This is a great idea! — Spike  Toronto  07:44, June 26, 2015 (UTC)


 * Done. The details should appear below the heading, but if they need to be placed somewhere else, let me know. --スリスト 16:42, 07.09.2015


 * Awesome! I just started noticing them. It’s terrific. Thanks! :) — Spike  Toronto  09:23, July 11, 2015 (UTC)

Personally disable?
A few people on our wiki do not like this script. Unbelievable, I know since this is a great feature. Anyway, is there something that an individual can add to his personal common.js/wikia.js that will disable it for him and him alone? Thanks! :) — Spike  Toronto  07:47, June 26, 2015 (UTC)


 * He/she can use some css, just copy - paste this code into his/her wikia.css Dai ca superman (talk) 06:53, June 27, 2015 (UTC)


 * Thanks! :) It’s so easy, I feel embarrassed to have asked. :D — Spike  Toronto  04:52, June 30, 2015 (UTC)

~Curiouscrab (talk) 19:01, July 9, 2015 (UTC)
 * I wonder who those people are...

To my, albeit feeble, recollection, I thought it was you who had complained about them. :D Oops! — Spike  Toronto  09:28, July 11, 2015 (UTC)

Errors in the German translation
Visiting a wikia using this script I've found some errors (mostly grammar and conflicts with the offical MediaWiki translation):

-- AmonFatalis ( wall  •  contribs ) 12:55, July 9, 2015 (UTC)


 * Corrected, thanks. --スリスト 16:17, 07.09.2015

Default lang
For the language default is there a reason you use "wgContentLanguage" instead of "wgUserLanguage"? "wgUserLanguage" seems to be more appropriate for this script in my opinion. Like if I put this in my global js and visit a French wiki, it will currently translate the script into French, where as "wgUserLanguage" would keep it in English (while still acting as "wgContentLanguage" for anons).

Also, I personally think it would be good to disable the script on the main page - using "wgIsMainPage" - to avoid it getting cluttered. I can do this on a personal basis of course, but while I'm here and it's on my mind, just mentioning it.


 * Added both changes, thanks. -- スリスト 22:26, 07.13.2015

Class vs Id
Is there a certain reason why this script uses .lastEdited rather than #lastEdited? I know changes might be necessary, but most other scripts use ids rather than classes since they're generally easier to work with since you only have to target one item rather than specifying an item out of many. This script only adds the info once, so it would work just fine with id. ~Curiouscrab (talk) 20:10, July 15, 2015 (UTC)

+ ca, pt, gl, it, ro, val
Hi, here are Catalan, European Portuguese (Portugal), Galician, İtalian, Romanian and Valencian translations.

--Josep Maria 20. (discussió • contribucions) 19:12, October 12, 2015 (UTC)
 * Added all, thanks. slyst (talk) 11:29, November 15, 2015 (UTC)

+ eo, sco
--Dser (talk) 02:46, October 13, 2015 (UTC)
 * Added both, thanks. slyst (talk) 11:29, November 15, 2015 (UTC)

?
What happened to the preview header on this page? Santademon (talk) 02:11, October 29, 2015 (UTC)
 * The demo was loaded via DemoScripts.js, which was deleted for "security concerns," and I doubt it's coming back as is. -- slyst (talk) 05:34, November 1, 2015 (UTC)

Bengali + Hindi +Hindi fiji
// বাংলা (Bengali) bn: { lastEdited: ' সম্পাদনা করেছেন $1 $2', comment: 'সম্পাদনার সারাংশ', size: 'বর্তমান আকার, created: 'তৈরি করেছে', loading: 'লোডিং হচ্ছে', changes: 'পরিবর্তন', link: 'লিংক', undo: 'সম্পাদনা বাতিল করুন, cancel: 'বাতিল' } // हिंदी (hindi) hi: { lastEdited: '$ 1 $ 2 से एडिट', comment: 'संपादन का सारांश', size: 'मौजूदा आकार', created: 'नए पेज', loading: 'लदान', changes: 'बियान अधिक अंक', link: 'लिंक', undo: 'रद्द करना' , cancel: 'रद्द करना' } //Fiji Hindi hif: { lastEdited: 'last edit kya $ 1 $ 2 ', comment: 'sampadana ka sarangsh', size: 'bortman akar', created: 'toiri kiiya hai', loading: 'load le ra hain', changes: 'paribartan', link: 'link', undo: 'batil' , cancel: 'baril' }

Abdullah Al Noman (talk) 11:01, December 3, 2015 (UTC)
 * Added all, thanks 空色バラ 11:00, October 14, 2016 (UTC)

Finnish
fi: { lastEdited: 'Viimenen muokkaus $1 $2', diff: 'ero', comment: 'Muokkauksen kuvaus', size: 'Nykyinen koko', created: 'Loin sivun.', loading: 'Viimeisen muokkauksen tietoja ladataan', changes: 'muutokset', link: 'Linkkaa', undo: 'Kumoa', cancel: 'Peruuta' } &#8752; High Goddess Venus-Afrodite-Finelia &#937; Mighty Ruler of the Gods &#8859; ( talk ) &#5099; 23:17, February 13, 2016 (UTC)
 * Added, thanks 空色バラ 11:00, October 14, 2016 (UTC)

Malay
Brandon Pow (talk) 06:09, February 16, 2016 (UTC)


 * Added, thanks 空色バラ 11:00, October 14, 2016 (UTC)

Responsive Diff
When I click the diff on my mobile, I can't see or very hard to see all the content of the diff table? Can you make it work smoothly on mobile device? Thank you Chiến Thần Vương (talk) 10:37, June 4, 2016 (UTC)
 * I've updated the script to use the new modal, so it should be more responsive now. Let me know if you're still having issues 空色バラ 11:00, October 14, 2016 (UTC)

Rollback Button
Can you add support for rollback button? Thank you :) Dai ca superman (talk) 16:23, August 27, 2016 (UTC)
 * Added 空色バラ 11:00, October 14, 2016 (UTC)

Minor edits
Would it be possible to add the minor edit symbol (i.e., m) to the info shown? Thanks! :) &mdash; Spike  Toronto  07:15, September 17, 2016 (UTC)


 * Bump! :) &mdash; Spike  Toronto  20:25, October 13, 2016 (UTC)
 * Added. Minor edits are marked with a [m] after the diff link now. Let me know if it needs to be somewhere else 空色バラ 11:00, October 14, 2016 (UTC)

Location of the text
Hi,

I love this, thanks a lot for creating it! I myself am not very good at JavaScript, so maybe you (or anyone) could help me a little. Currently, I use an obsolete version of the script on w:c:moderncombat. As you can see, the text is not on the place on which the latest version puts it. How can I edit the latest version so that the text is there, and not below the title?

I described my problem here, too: w::thread:1114992

Thanks in advance,

--ysbert 💬 📝 16:29, September 21, 2016 (UTC)
 * I've added the  variable in the options to accommodate for this. To reciprocate what you have on w:c:moderncombat, simply add


 * in the configurations (after the script has been approved, ofc) and you should be good to go. Although remember, the details also include the edit summary and size, so you might need some CSS to fix that 空色バラ 11:00, October 14, 2016 (UTC)

IT
Minor tweaks to the IT translation:

Also, wouldn't it be more useful to know the size of the last edit rather the the current size of the page? 18:44, September 21, 2016 (UTC)
 * Corrected, thanks 空色バラ 11:00, October 14, 2016 (UTC)

Suggestion

 * Add edit size
 * Retrieve localized mediawiki messages for talk/contribs/block  10:10, October 5, 2016 (UTC)


 * Added
 * Is it really required? I could retrieve the messages through an API call, but I don't see the point in adding it just for that 空色バラ 11:00, October 14, 2016 (UTC)


 * Well, without it those 3 links remain in English regardless of the language used. If you want to avoid the API call, you could add them as i18n messages  15:41, October 14, 2016 (UTC)


 * Yes I know, but it shouldn't be much of an issue? The main problem I have with adding new i18n messages is that the script already has 25+ languages, so it would be a hassle asking the authors to provide three meager translations that the script can do without 空色バラ 16:33, October 14, 2016 (UTC)


 * I think it's weird to have only some parts translated, especially since the script actually consists in few sentences, therefore you see it half in English and half in your language. I don't think you have to bother the translators, just add the strings and if the translation is not present it will fall back to EN anyway (like now), won't it? Also, technically the translations are already available, since they are the same messages as MediaWiki:talkpagelinktext, MediaWiki:contribslink, MediaWiki:blocklink. So you can just add the suffix of the language and copy the messages. If you want I can do it afterwards. P.S.: where did you add the edit size exactly?  16:49, October 14, 2016 (UTC)

Bug in configuration
I believe I've found a bug with the configuration of this script. If  is missing from the configuration object, the script will throw an error, cannot read property 'constructor' of undefined for the line 415, where a comparison is made. I'm not familiar with that stuff, but I'm assuming you're missing a check there that prevents the script from breaking if the exclude array is not provided. &mdash; Mainframe98 talk · edits  15:35, October 14, 2016 (UTC)


 * This should be fixed once the script passes review 空色バラ 16:33, October 14, 2016 (UTC)