Skip to content

Commit

Permalink
add default type text/javascript of none is defined (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
webworkerJoshua authored Mar 26, 2024
1 parent c4dfb30 commit 5f11bea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog of PrivacyWire

## 1.1.6
- add default type `text/javascript` if no `data-type` is defined. https://github.com/webworkerJoshua/privacywire/issues/33

## 1.1.5

- Trigger CustomEvents when banner and options are opened/closed by @teppokoivula in https://github.com/webworkerJoshua/privacywire/pull/32
Expand Down
2 changes: 1 addition & 1 deletion PrivacyWire.module
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PrivacyWire extends WireData implements Module, ConfigurableModule
'summary' => "This module adds management options for GDPR-relevant elements (loading maps, videos etc. only after accepting external media) and cookies.",
'author' => "blaueQuelle",
'href' => "https://github.com/blaueQuelle/privacywire",
'version' => "1.1.5",
'version' => "1.1.6",
'autoload' => true,
'singular' => true,
'requires' => ["PHP>=7.2", "ProcessWire>=3.0.110"],
Expand Down
2 changes: 1 addition & 1 deletion src/js/PrivacyWire.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class PrivacyWire {

updateAllowedElementOther(el) {
const {dataset} = el
el.type = dataset.type
el.type = dataset.type ?? 'text/javascript'
el.src = dataset.src
el.srcset = dataset.srcset
this.removeUnusedAttributesFromElement(el)
Expand Down

0 comments on commit 5f11bea

Please sign in to comment.