Skip to content

Commit

Permalink
Remove workaround for editing site metadata; fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjb committed Jan 27, 2017
1 parent 09674e1 commit 2355ab1
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions web-framework/editplus/editplus-nester.html
Expand Up @@ -13,26 +13,6 @@
<!--@@ Edit+ Configuration, customised for Analytics @@-->
<script src="./?a=318177?v=%globals_asset_version:318177%"></script>

<!--@@ JCU workaround for not being able to edit Site metadata @@-->
<script>
(function() {
var oldFn = Squiz_Matrix_API.prototype.getKeywordsReplacements
Squiz_Matrix_API.prototype.getKeywordsReplacements = function() {
// Prevent redirection for Site assets
// Avoid uses of Squiz percent global keywords which actually resolve
if (arguments.length === 1 &&
arguments[0] &&
arguments[0].keywords_array &&
arguments[0].keywords_array.length === 1 &&
arguments[0].keywords_array[0] === ('%' + 'asset_index_id%')) {
arguments[0].keywords_array[0] = '%' + 'nonexistent_keyword%'
}
// getKeywordsReplacements is expecting either 0 or 1 arguments so apply
return oldFn.apply(this, arguments)
}
})()
</script>

<!--@@ Edit+ Core Scripts @@-->
<script src="/__data/ees/easyedit.min.js"></script>
<script src="/__data/ees/Viper/viper.js"></script>
Expand Down

0 comments on commit 2355ab1

Please sign in to comment.