Skip to content

Commit

Permalink
Fix a bug causing errors on non entity pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Teester committed Jul 6, 2024
1 parent 06754a2 commit 593f42c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* EntityShape.js adds an input box to a wikidata page wherein you can enter an entityschema
* (such as E10). When you click "Check", checks whether each statement and property conforms
* to the schema. It then displays a summary at the top of the item for each property indicating
* whether they conform or not. It also adds a badge to each statement and each property on the
* page indicating whether they conform or not.
**/

(function() {
let entityschema_stylesheet = entityschema_getStylesheet();
$('html > head').append("<style>" + entityschema_stylesheet + "</style>");
Expand Down Expand Up @@ -62,7 +70,7 @@ function check_entity_for_schemas(entity_list) {
}

$(document).ajaxStop(function () {
if (value == "true") {
if (value == "true" && mw.config.get( 'wbEntityId' )) {
entityschema_update()
}
$("#entityschema-entityToCheck:text").val(schema);
Expand Down

0 comments on commit 593f42c

Please sign in to comment.