Allow using an ID attribute on the script tag

Created on 11 March 2025, 27 days ago

Problem/Motivation

I have seen ReadSpeaker provide an ID attribute on the script tag, whenever they provide the script tag to place on the page.

For example (Replaced client ID with example values):

<script src="https://cdn-eu.readspeaker.com/script/1234567/webReader/webReader.js?pids=wr" type="text/javascript" id="rs_req_Init"></script>

From what I've seen, this ID is actually used somewhere in the minified version of the Javascript (At least the ones that I've seen):

n=document.getElementById("rs_req_Init")||document.currentScript

It seems to have a fallback anyway, so I'm not sure how necessary it is.

Regardless, I believe we could have a way to include an ID attribute to the script tag when using this module.

Steps to reproduce

  1. Configure Readspeaker module
  2. Check the script tag on the page
  3. ID attribute is not present

Proposed resolution

Add a configurable ID attribute for the script tag.

User interface changes

There will be a new configuration text option in the configuration form.

Data model changes

There will be a new configuration text option in the config schema.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇵🇹Portugal gueguerreiro Lisboa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024