Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
User:Alexbfree/Code:GDPRMailAccess.js
(view source)
Revision as of 14:35, 24 February 2020
102 bytes added
,
4 years ago
no edit summary
Line 20:
Line 20:
function isDataController() {
function isDataController() {
let foundThatThisIsAnInstanceOfDataController = false;
let foundThatThisIsAnInstanceOfDataController = false;
+
console.log('here1');
if ( typeof mw.config.values.wbEntity != "undefined" ) // if we are on the page of a loaded entity
if ( typeof mw.config.values.wbEntity != "undefined" ) // if we are on the page of a loaded entity
{
{
+
console.log('here2');
console.dir(obj);
console.dir(obj);
let obj = JSON.parse ( mw.config.values.wbEntity );
let obj = JSON.parse ( mw.config.values.wbEntity );
if ( typeof check( obj, 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');
let claims = dive( obj, INSTANCE_OF_PROPERTY ); // get the claims which use the "instance of" property
let claims = dive( obj, INSTANCE_OF_PROPERTY ); // get the claims which use the "instance of" property
if (claims.some(claimUsesDataControllerAsItsObject))
if (claims.some(claimUsesDataControllerAsItsObject))
{
{
+
console.log('here4');
foundThatThisIsAnInstanceOfDataController = true;
foundThatThisIsAnInstanceOfDataController = true;
}
}
Alexbfree
editors
3,524
edits
Navigation menu
Personal tools
Log in
Request account
Namespaces
User page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
New Item
New Property
All items
All properties
All pages
Active Users
SAR service dev
Query Service
Maintenance
Administrator
Tools
User contributions
Logs
View user groups
Special pages
Printable version
Interaction
Community portal
WebXray
Recent changes
Contact Page
Telegram
Discourse forum
MyData Slack