Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: The SocratiQ URL does not work on Chrome or Edge #540

Open
hpssjellis opened this issue Nov 28, 2024 · 2 comments
Open

Bug: The SocratiQ URL does not work on Chrome or Edge #540

hpssjellis opened this issue Nov 28, 2024 · 2 comments
Assignees

Comments

@hpssjellis
Copy link

hpssjellis commented Nov 28, 2024

The button to turn SocratiQ on or off works fine, but for me on Chrome and Edge the URL

To activate: https://mlsysbook.ai/?socratiq=true
To deactivate: https://mlsysbook.ai/?socratiq=false

Does not change the button from on to off etc or change the state of socratiQ on the page. I tried the following without any improvement

https://mlsysbook.ai/?socratiQ=true

image

In the code the part that responds to the cookie is here

// Initialize the button state based on the "socratiq" cookie
const toggleButton = document.getElementById('socratiq-toggle');
const isSocratiQActive = getCookie('socratiq') === 'true';
if (isSocratiQActive) {
toggleButton.classList.add('on');
toggleButton.textContent = 'ON';
}
// Function to handle the toggle button click

Possibly the problem is that when the toggle button is turned off, the cookie socratiq is deleted instead of being turned to false, then when the URL is used there is no cookie to update. This theory doesn't work for why the url doesn't shut off socratiq but at least it is a start.

image

@profvjreddi
Copy link
Contributor

Thanks for filing these issues @hpssjellis, I've tagged @kai4avaya on these to take a look.

@kai4avaya
Copy link
Collaborator

Hi @hpssjellis Great catch! This should be fixed in the next update. The code is tracking this url parameter: widget_access but not socratiq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants