Wikidata talk:Tools/it

From Wikidata
Jump to navigation Jump to search

Font size for code

[edit]

Why not to keep the font-size of the code consistent with other parts of the site? Is there a good reason to use "font-size: large" (18px)? I think the default (13px) is good enough (as seen on Google Chrome 22.0.1229.94). If not, consider proposing changes to MediaWiki:Common.css or MediaWiki:Geshi.css instead of using inline styles. Helder 13:58, 4 November 2012 (UTC)

For two reasons. Many people do not know the programming languages ​​for which a larger font size is read and stored before the normal font size. The other reason is related to the accessibility of wikidata. I've seen your changes and I appreciate it. --Raoli (talk) 15:03, 4 November 2012 (UTC)[reply]
In the general case, however, very large fonts could make float the content out of the box then IMO is good for this page, but in general I agree with you that it is useless. :) Raoli (talk) 15:07, 4 November 2012 (UTC)[reply]
Ok then. I added that page to my watchlist ;-). Helder 15:13, 4 November 2012 (UTC)
[edit]

I tested Interlink tool both on it.wikisource and it.wikivoyage, it runs perfect.

The only edit I done to allow linking of author items (in mmany wikisource projects there's a specific nsAuthor for authors, while works are listed into ns0) is a small change here:

var namespace = mw.config.get( 'wgCanonicalNamespace' );
        if( namespace === '' ) {
var namespace = mw.config.get( 'wgCanonicalNamespace' );
        if( namespace === '' || namespace ==="Autore") {

I noted that there's plenty of data fron ajax call, and the script only uses one (ID). It's a pity! So I add some more rows to save both the whole data object and the ID into a $("body").data() container. Follows the it.wikisource version. A Commons version is running at commons:User:Alex brollo/common.js.

Original version
for( var i in data.entities ) {
       if( i != -1 ) {
             mw.util.addPortletLink( 'p-tb', '//www.wikidata.org/wiki/' + data.entities[i].title, 'Wikidata' );
             }
} 
Data-saving version
for( var i in data.entities ) {
       if( i != -1 ) {
             $("body").data("wikidata",data);
             $("body").data("wikidataID",data.entities[i].title.toLowerCase());
             mw.util.addPortletLink( 'p-tb', '//www.wikidata.org/wiki/'+ data.entities[i].title, 'Wikidata' );
             }
} 

So, the whole set of data object is saved for any use. --Alex brollo (talk) 18:09, 2 March 2013 (UTC)[reply]