Changes

Jump to navigation Jump to search
no edit summary
Line 12: Line 12:  
     mw.notify( expanded , { autoHide: false } ); // pop up the notification with the link
 
     mw.notify( expanded , { autoHide: false } ); // pop up the notification with the link
 
} );
 
} );
 +
}
 +
 +
function claimUsesDataControllerAsItsObject(claim) {
 +
return dive( claim , 'mainsnak.datavalue.value')['numeric-id'] === DATA_CONTROLLER_ITEM_ID;
 
}
 
}
   Line 22: Line 26:  
{
 
{
 
let instance_of_claims = dive( obj, INSTANCE_OF_PROPERTY );
 
let instance_of_claims = dive( obj, INSTANCE_OF_PROPERTY );
if (instance_of_claims.some(dive( instance_of_claims[i] , 'mainsnak.datavalue.value')['numeric-id'] === DATA_CONTROLLER_ITEM_ID))
+
if (instance_of_claims.some(claimUsesDataControllerAsItsObject))
 
{
 
{
 
  foundThatThisIsAnInstanceOfDataController = true;
 
  foundThatThisIsAnInstanceOfDataController = true;
editors
3,524

edits

Navigation menu