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

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)

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)

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)