Git Product home page Git Product logo

Comments (7)

dydrmr avatar dydrmr commented on May 20, 2024

Hi,

Thanks for the kind words; I'm glad you find the site so useful! Are there any error messages in the developer console when this problem happens? Hard to tell what's going on without seeing it in action. It could be the Javascript URL rewriting that's messing it up, or maybe it's not reading settings properly from local storage because it's in an iframe?

If you feel comfortable letting me access this particular page on your org's site, I could take a look at it myself.

The real local time is based on the system time set on the computer accessing the site. There's no way to change that on VerseTime right now, but it could be implemented with a user-defined setting.

from versetime.

Donati5142 avatar Donati5142 commented on May 20, 2024

I really appreciate you taking the time to visit us. Here's a link to the website:
https://orisonspaceport.wixsite.com/orison/versetime

When you first access the page, the VERSETIME loads perfectly in the iFrame. However, if you navigate within the site and refresh the page, the VERSETIME fails to load in the iFrame.

It will only function again after a complete reset of the browser settings.

from versetime.

dydrmr avatar dydrmr commented on May 20, 2024

Hm, it won't even load VerseTime inside the iFrame for me. Aditionally, I'm getting cross-origin errors thrown whenever VerseTime tries to modify the URL (which happens on first load and anytime the selected location changes):

Uncaught DOMException: Blocked a frame with origin "https://dydrmr.github.io" from accessing a cross-origin frame. at setLocation (https://dydrmr.github.io/VerseTime/ui-controller.js:91:24)

Do you have the ability to change CORS settings on your site to allow resources from outside of your domain?

from versetime.

Donati5142 avatar Donati5142 commented on May 20, 2024

Unfortunately, my knowledge of this stuff is really bad, That is why I designed the website on WIX, lol.
I can tell you that I'm loading 3 other sites, like https://verseguide.com/ & SCMiningMom.com, blog page, etc. as examples using the same method. Strange that it does not open for you at least once.


Uncaught DOMException: Blocked a frame with origin "https://dydrmr.github.io" from accessing a cross-origin frame. at setLocation (https://dydrmr.github.io/VerseTime/ui-controller.js:91:24
This error occurs because of the same-origin policy, which prevents a web page from accessing resources or content from a different domain. In this case, the iframe is trying to access the content of the website hosted at "https://dydrmr.github.io/", which is different from the domain hosting the iframe.

One solution is to use a proxy server that makes the request to the website on behalf of your page, so that the browser does not block the request due to the same-origin policy. You can create a simple proxy server using a server-side language such as PHP or Node.js, or you can use a publicly available proxy service.

Here's an example using a publicly available proxy service "CORS Anywhere":

<iframe src="https://cors-anywhere.herokuapp.com/https://dydrmr.github.io/VerseTime/"></iframe> This makes a request to the proxy service, which in turn makes the request to the website and returns the result to your page, effectively bypassing the same-origin policy.

missing required request header error
This error message usually occurs when a server is configured to only allow requests that include a specific header, such as an "Authorization" header. The server is rejecting the request because it doesn't contain the required header.

If you are using a proxy service, such as "CORS Anywhere", to bypass the same-origin policy, you may need to add the required header to the request.

Here's an example of adding an "Authorization" header to the request:

php
Copy code

<iframe src="https://cors-anywhere.herokuapp.com/https://dydrmr.github.io/VerseTime/"></iframe> <script> document.querySelector("iframe").addEventListener("load", function() { this.contentWindow.fetch = function(input, init) { init = init || {}; init.headers = init.headers || {}; init.headers["Authorization"] = "Bearer xxxxxxxx"; return window.fetch.apply(this, [input, init]); }; }); </script> In this example, the "Authorization" header is added to the request when the iframe loads. The value of the header, "Bearer xxxxxxxx", should be replaced with the actual value required by the server.

Don't know if any of this makes sense to you. :)

from versetime.

Donati5142 avatar Donati5142 commented on May 20, 2024

ps. I recreated this in Squarespace, (WIX competition) Get the same problem there. So it's not WIX-specific.

from versetime.

dydrmr avatar dydrmr commented on May 20, 2024

I'm still not sure what could be causing this. My suggestion would be to download the repository and try embedding a local copy of VerseTime on your site.

I'm handling a substance abuse intervention in my family right now and it's taking up all of my time and energy, so I don't know when I'll be able to get back to this project and investigate further. Hope you can get it to work, though. Keep us posted.

from versetime.

Donati5142 avatar Donati5142 commented on May 20, 2024

Sure thing, 100%
Thank you for your support and time.

from versetime.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.