Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4645635
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Ladsgroup
Oct 23 2016, 8:53 AM
2016-10-23 08:53:09 (UTC+0)
Size
887 B
Referenced Files
None
Subscribers
None
View Options
/**
* Created by amir on 10/23/16.
*/
( function ( mw, $ ) {
'use strict';
var colors = {
0.40: '#750787',
0.50: '#004DFF',
0.60: '#008026',
0.70: '#FFED00',
0.80: '#FF8C00',
0.90: '#E40303'
}
$('li').each( function (){
if ( $( this ).children('a').attr('href') ) {
var reg = /diff=(\d+)/ig
var res = reg.exec( $(this).children('a').attr('href') );
if (res && res[1] in mw.config.get('oresData')) {
var score = mw.config.get('oresData')[res[1]]['damaging'];
var threshold = 0;
for ( threshold in colors ) {
if ( score > threshold ) {
$( this ).css( 'background-color', colors[threshold]);
}
}
}
}
} )
}( mediaWiki, jQuery ) );
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4086339
Default Alt Text
(887 B)
Attached To
Mode
P4289 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment