Line 20:
Line 20:
--find Wikidata item
--find Wikidata item
if currentTitle.namespace == 0 then --mainspace
if currentTitle.namespace == 0 then --mainspace
−
local currentEntityId = mw.wikibase.getEntityIdForCurrentPage()
+
local currentEntityId = mw.ext.UnlinkedWikibase.getEntityId('enwiki')
if resolveEntity._id(currentEntityId) then
if resolveEntity._id(currentEntityId) then
−
currentItem = mw.wikibase.getEntity(currentEntityId)
+
currentItem = mw.ext.UnlinkedWikibase.getEntity(currentEntityId)
else --currentEntityId == nil/unresolvable
else --currentEntityId == nil/unresolvable
return categories[1]
return categories[1]