Skip to content

Commit a125271

Browse files
authored
Merge pull request #37 from ieq-health/develop
Update mailto generator
2 parents daa0081 + 65ba76b commit a125271

6 files changed

+17
-8
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [0.22.6] - 2024-10-24
4+
5+
### Fixed
6+
- wrap mailto-generator in IIFE
7+
8+
39
## [0.22.5] - 2024-05-10
410

511
### Added

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "templateq",
3-
"version": "0.22.5",
3+
"version": "0.22.6",
44
"description": "Wordpress theme to power qnipsel",
55
"main": "webpack.config.js",
66
"scripts": {

src/functions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/** Set version
44
* Used for cachebusting JS/CSS
55
*/
6-
$GLOBALS['qnipsel_version'] = '0.22.5';
6+
$GLOBALS['qnipsel_version'] = '0.22.6';
77

88
/** Custom Fields
99
* Set up the Custom Fields plugin and define some fields.

src/scss/style.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Theme Name: templateQ
33
Author: Christian Brassat
44
Description: Theme for templateQ
5-
Version: 0.22.5
5+
Version: 0.22.6
66
*/
77

88
// Configure Bulma

src/templates/page-mailto-generator.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,12 @@
4545
addressOutput = addressOutput.slice(0, -1);
4646

4747
output.value = `\<script\>
48-
let UnCryptMailto = (s) => s.split(';').map((c) => String.fromCharCode(parseInt(c))).join('');
49-
document.write('<a href="mailto:' + UnCryptMailto('${addressOutput}') + '">' + UnCryptMailto('${addressOutput}') + '</a>')
50-
\<\/script\>`;
48+
(function() {
49+
let UnCryptMailto = (s) => s.split(';').map((c) => String.fromCharCode(parseInt(c))).join('');
50+
document.write('<a href="mailto:' + UnCryptMailto('${addressOutput}') + '">' + UnCryptMailto('${addressOutput}') + '</a>')
51+
\<\/script\>
52+
})();`;
53+
5154
});
5255
</script>
5356

0 commit comments

Comments
 (0)