User talk:Petr Matas/ExportClaims.js

From Wikidata
Jump to navigation Jump to search

Does not work

[edit]

Doesn't work for me. Copy-paste buffer is not filled. I'll try playing with it later. (Chrome on Windows 7 PC) - PKM (talk) 02:03, 21 December 2014 (UTC) (copied from WD:Project chat/Archive/2014/12#make duplicate)[reply]

A window with pre-selected text should appear upon hovering on the heading. Does it? You copy that text using Ctrl+C. Petr Matas 22:08, 21 December 2014 (UTC)[reply]
it doesn't. Would a pop-up blocker cause this? I won't be able to play with it now until next week, - PKM (talk) 04:03, 22 December 2014 (UTC)[reply]
I don't think so. I have added a dialog box, which should appear on item pages upon gadget initialization. Does it? Press Ctrl+Shift+R to make sure the Chrome's cache is purged. Petr Matas 14:58, 22 December 2014 (UTC)[reply]
Hello again PKM, do you have some time to continue with this? Petr Matas 20:12, 8 January 2015 (UTC)[reply]
Can we be precise? When does "gadget initialization" happen? I do not get a dialog box. No indication of any change when I hover over the statements heading. - PKM (talk) 00:54, 9 January 2015 (UTC)[reply]
It happens just after the item page loads, so it is clear that the initialization is not started for you. I have just moved the dialog box invocation to the first line of the script. It reads window.alert('ExportClaims gadget loading. This box is shown for debugging purposes and will be removed soon.');. Does it appear now? You may also try to add this line to your common.js directly. We need something to see whether the script execution got to a given line or not. Petr Matas 01:19, 9 January 2015 (UTC)[reply]
I removed the script from my Common.js and then re-added it. Nothing happens. Also added window.alert('ExportClaims gadget loading. This box is shown for debugging purposes and will be removed soon.'); to my common.js directly. It does not appear. Perhaps some other script I am loading is conflicting with yours? https://www.wikidata.org/wiki/User:PKM/common.js - PKM (talk) 03:12, 9 January 2015 (UTC)[reply]
It seems to me that the <!-- and --> tags are breaking your common.js altogether. Try using // line that you wish to disable or /* block that you wish to disable */ instead. Petr Matas 10:06, 9 January 2015 (UTC)[reply]
Pinging PKM... Petr Matas 12:12, 10 January 2015 (UTC)[reply]
...because of course it's not HTML! That fixed it - works even on the iPad now! Thanks for your patience. - PKM (talk) 19:24, 10 January 2015 (UTC)[reply]
And can we turn off the debugger now?  :-) - PKM (talk) 20:56, 10 January 2015 (UTC)[reply]
✓ Done, thanks to you as well. Petr Matas 23:25, 10 January 2015 (UTC)[reply]

How to return focus to the page?

[edit]

Upon hovering above the Statements heading, focus is set to the displayed text area to facilitate copying of the exported text (it's sufficient to press Ctrl+C). When you move the mouse away, the text area disappears, but focus is not returned to the page, so you can't scroll using arrow keys anymore. Does anyone know how to return the focus programmatically? $('#claims').focus(); does not seem to work. Petr Matas 09:31, 25 December 2014 (UTC)[reply]

Really useful

[edit]

I just wanted to drop a note to say I've been using the tool for a while now and it's been a huge help, especially when I'm creating an item for a museum that's in an historic building. I can usually copy five or six fields with your tool. Thanks again! - PKM (talk) 07:16, 18 January 2015 (UTC)[reply]

Question

[edit]

Did you make a change to the program? Now I'm having trouble selecting the text in the box. - PKM (talk) 02:29, 19 January 2015 (UTC)[reply]

It seems that the program stopped working. Let's hope that I will have time to fix it soon. Note for me: See User talk:Petr Matas#wbEntity config value to be dropped on July 24th. Petr Matas 13:15, 22 July 2019 (UTC)[reply]