Difference between revisions of "User:Abel/experimental.js"
Jump to navigation
Jump to search
m |
m |
||
Line 2: | Line 2: | ||
// Experimental Main | // Experimental Main | ||
console.log("'⌣'"); | console.log("'⌣'"); | ||
+ | |||
+ | var controller_item_id = 96, | ||
+ | personal_data_id = 421, | ||
+ | interface_button_id = 487, | ||
+ | |||
+ | language = "en", | ||
+ | |||
+ | wbEStruct = { | ||
+ | subclassOfRelations: 'claims.P4', // location of P4 relations in wbEntity | ||
+ | defaultValRelation: 'claims.P108', | ||
+ | concernsRelation: 'claims.P110', | ||
+ | instanceOfRelations: 'claims.P3', | ||
+ | IDPropLoc: 'mainsnak.datavalue.value', // location of ID properties in related entity | ||
+ | IDName: 'numeric-id', // ID property name which checked | ||
+ | qIDPropName: 'id', | ||
+ | standardValue: 'labels' + '.' + language + '.' + 'value' | ||
+ | }, | ||
+ | mwEStruct = { | ||
+ | wbXntity: 'config.values.wbEntity' | ||
+ | }; | ||
mw.loader.using( ['ext.gadget.WbProcessor', 'ext.gadget.PersonalDataBase', 'ext.gadget.PDOOUI'] , function (){ | mw.loader.using( ['ext.gadget.WbProcessor', 'ext.gadget.PersonalDataBase', 'ext.gadget.PDOOUI'] , function (){ | ||
− | + | console.log('Wbprocessor active'); | |
− | + | console.log('Personaldatabase active'); | |
− | + | console.log('User Interface active'); | |
+ | |||
+ | current_entity = wbproc.checkentity( instanceof, id_list ); | ||
+ | |||
+ | switch (current_entity) { | ||
+ | case data_controller: | ||
+ | pdooui.controller_display(); | ||
+ | break; | ||
+ | |||
+ | case personal_data: | ||
+ | pdooui.input_display(); | ||
+ | break; | ||
+ | |||
+ | case interface_button: | ||
+ | pdooui.data_editor(); | ||
+ | } | ||
+ | |||
}); | }); |
Revision as of 03:42, 14 May 2019
// License: GPL
// Experimental Main
console.log("'⌣'");
var controller_item_id = 96,
personal_data_id = 421,
interface_button_id = 487,
language = "en",
wbEStruct = {
subclassOfRelations: 'claims.P4', // location of P4 relations in wbEntity
defaultValRelation: 'claims.P108',
concernsRelation: 'claims.P110',
instanceOfRelations: 'claims.P3',
IDPropLoc: 'mainsnak.datavalue.value', // location of ID properties in related entity
IDName: 'numeric-id', // ID property name which checked
qIDPropName: 'id',
standardValue: 'labels' + '.' + language + '.' + 'value'
},
mwEStruct = {
wbXntity: 'config.values.wbEntity'
};
mw.loader.using( ['ext.gadget.WbProcessor', 'ext.gadget.PersonalDataBase', 'ext.gadget.PDOOUI'] , function (){
console.log('Wbprocessor active');
console.log('Personaldatabase active');
console.log('User Interface active');
current_entity = wbproc.checkentity( instanceof, id_list );
switch (current_entity) {
case data_controller:
pdooui.controller_display();
break;
case personal_data:
pdooui.input_display();
break;
case interface_button:
pdooui.data_editor();
}
});