AndyRussG has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79549
Change subject: Add getTourSpec to public API for mw.guidedTour
......................................................................
Add getTourSpec to public API for mw.guidedTour
Added the getTourSpec(name) to the public API for mw.guidedTour.
This allows programmatic modification of tour specifications.
Change-Id: I682886bb16dce2d188936bc87763cfecb2b98849
---
M modules/ext.guidedTour.lib.js
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour
refs/changes/49/79549/1
diff --git a/modules/ext.guidedTour.lib.js b/modules/ext.guidedTour.lib.js
index a3eb529..8a8c743 100644
--- a/modules/ext.guidedTour.lib.js
+++ b/modules/ext.guidedTour.lib.js
@@ -789,6 +789,15 @@
}
/**
+ * Gets specificatin of the tour named.
+ *
+ * @param {string} The name of the tour, as registered.
+ */
+ function getTourSpec(name) {
+ return definedTours[name];
+ }
+
+ /**
* Internal initialization of guiders and guidedtour, called once after
singleton
* is built.
*
@@ -1600,6 +1609,15 @@
**/
TourDefinitionError: function ( message ) {
this.message = message;
+ },
+
+ /**
+ * Gets the tour named.
+ *
+ * @param {string} The name of the tour, as registered.
+ */
+ getTourSpec: function (name) {
+ return getTourSpec(name); // This calls the funciton
defined above
}
} );
--
To view, visit https://gerrit.wikimedia.org/r/79549
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I682886bb16dce2d188936bc87763cfecb2b98849
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits