Changes

Jump to navigation Jump to search
no edit summary
Line 27: Line 27:  
     console.log(pageID);
 
     console.log(pageID);
   −
     if (isDataController()) {
+
     if (isDataController(entity)) {
 
  console.log('is dc');
 
  console.log('is dc');
 
  generateGDPRLink(pageID);
 
  generateGDPRLink(pageID);
Line 33: Line 33:  
});
 
});
   −
function isDataController() {
+
function isDataController(entity) {
 
let foundThatThisIsAnInstanceOfDataController = false;
 
let foundThatThisIsAnInstanceOfDataController = false;
 
console.log('here1');
 
console.log('here1');
Line 40: Line 40:  
{
 
{
 
  console.log( "entity is defined" );
 
  console.log( "entity is defined" );
  var obj = entity ;
   
  console.log('here2');
 
  console.log('here2');
  console.dir(obj);
+
  console.dir(entity);
  let obj = JSON.parse ( mw.config.values.wbEntity );
+
  if ( typeof check( entity, INSTANCE_OF_PROPERTY ) != "undefined" ) // if the entity has any "instance of" claim
  if ( typeof check( obj, INSTANCE_OF_PROPERTY ) != "undefined" ) // if the entity has any "instance of" claim
   
  {
 
  {
 
console.log('here3');
 
console.log('here3');
let claims = dive( obj, INSTANCE_OF_PROPERTY ); // get the claims which use the "instance of" property
+
let claims = dive( entity, INSTANCE_OF_PROPERTY ); // get the claims which use the "instance of" property
 
if (claims.some(claimUsesDataControllerAsItsObject))
 
if (claims.some(claimUsesDataControllerAsItsObject))
 
{
 
{
editors
3,524

edits

Navigation menu