Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Two newbie questions, one javascript and one css

1) I am lately hit with: javascript notice: Your browser couldn't save the state of the story. You may continue.....

Whenever I am trying to test play my own 1.42 stories. The alert pops up on the first page. Then the back button stops working. I checked and it happened to twine game developed by other too. Did chrome change their security or something? Anyone know? How can an author check the player browser and take care of it, or at least warn the user with a solution?

I think this happens after a chrome update.

The problem does not exist in opera

I know i am asking a chrome question in the twine forum but, hey, I think some authors may want to know this too.

2) I want a floating div (absolute position div) on top of the passage, loading from the sidebar. however no matter how high z-index is set the passage is always on top of the floating div. I have even try setting the passage z-index to 5 and my floating div to 1500 and still the passage sit on top of my div. Any idea why? It happens both on chrome and opera.

Comments

  • edited September 2015
    okay first question answered in a sugarcube post. who would know chrome 45 killed the history API intentionally?

    so what can I do? I use sugercane.
  • Found a workaround for my second question but I still wonder if anyone can do better.

    The workaround set the passage to display none when my pops up load, skipping the z-index mess all along.

    <a onmousemove='javascript:fullstat.style.display="block";passageCastleSandbox.style.display="none";' onmouseout='javascript:fullstat.style.display="none";passageCastleSandbox.style.display="block";'>Full Stat</a><div id="fullstat" style="display:none;font-size:11px;background-color:rgba(240,255,255,1);color:rgb(128,128,128);position: fixed;left: 297px;top: 49px; right: 150px; bottom: 19px; text-align: left;padding: 5px;"><<display "Player stat">></div>
  • 1) I am lately hit with: javascript notice: Your browser couldn't save the state of the story. You may continue.....
    Some of your options are:

    1. Use a different brand browser to view your story(s).
    Maybe you will be able to change back to Chrome if Google changes their mind again.

    2. Change to the SugarCube story format, which has been patched to stop this error.
    It supports all the Sugacane macros, although you will need to check and update your CSS because SugarCube uses some different base CSS selectors.

    3. Run an instance of Chrome with the --allow-file-access-from-files parameter.
    WARNING: This partially changes Chrome's security model so don't use this instance to assess the internet.

    4. Wait until the developer (or someone else) or Sugarcane patches it.
    This maybe a long wait because it requires a new release of Twine 1.x, and even though the source code of Twine 1.x (and it's story formats) have been update as recently as June 2015 there has not been a release of Twine 1.x for more than a year.
    I want a floating div (absolute position div) on top of the passage, ....
    An example of your existing CSS would help, so whoever tries to solve this issue knows exactly what you have modified.
  • edited September 2015
    My existing css is short and there is basically nothing except a few twisted fonts and background. That is why I am wondering why a popup div goes under the default passage, unless I mess up passage in so little code...
    html {
    height: 100%;
    }
    body {
    /*background-image: [img[xxx]], [img[yyy]];*/
    background-repeat:repeat-x;
    background-attachment:fixed;
    background-position: center top, center bottom;
    background:linear-gradient(45deg, rgba(255,255,255,0.2), rgba(61,61,31,1));
    color:rgba(128,128,128,1);
    min-height:100%;
    height:auto !important;
    height:100%;
    }
    #sidebar {
    color:rgba(80,80,80,1);
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    }
    #sidebar #title {
    color:rgba(80,80,80,1);
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    }
    #sidebar #title #storyTitle {
    color:rgba(80,80,80,1);
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    }
    #passages {
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    position: absolute; top: 48px; bottom: 50px; left: 60px; right: 150px;
    }
    .passage {
    /* This only affects passages */
    background-color:rgba(240,255,255,0.6);
    color:rgba(108,92,108,1);
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    padding: 1.5em;
    padding-top: 2em;
    padding-left: 2em;
    padding-bottom: 2em;
    min-height:98%;
    }
    .passage a {
    /* This affects passage links */
    border-bottom: solid #000 1px;
    color:#000;

    }
    .passage a:hover {
    /* This affects links while the cursor is over them */
    text-decoration:none;
    border-bottom: solid #000 0px;
    color:#a00000;
    }
  • edited September 2015
    Bad news. Opera is now giving the same error.

    Does it means that it is a forced switch to twine version 2? As far as I can tell, the markup language is not backward compatible, not to mention all the scripts.
  • edited September 2015
    egaskrad wrote: »
    Bad news. Opera is now giving the same error.
    Opera is based on the same core code as Chrome, so it was very likely it would end up having the same issue.

    Both SugarCube 1 and 2 have been patched to handle this issue better.
    The markup language is determined by which Story Format you use, not which version of Twine.
  • edited September 2015
    Opera was okay when I launch this thread...
    greyelf wrote: »
    Both SugarCube 1 and 2 have been patched to handle this issue better.
    The markup language is determined by which Story Format you use, not which version of Twine.

    I have installed and tried switching over to sugarcube on my current game and I am still having error. It said something about having me putting the page on somewhere so that I can access it through http... well, not a solution I am expecting.

    I have been using sugarcane all these years. Does it means that I can use sugarcane when I move over to twine 2? I remember trying out twine when it first launch and that option is not available.... but then not even the offline version was available.
  • egaskrad wrote: »
    Opera was okay when I launch this thread...
    Opera lags behind Chrome a little in adopting changes to the Chromium codebase. That accounts for the delay.

    egaskrad wrote: »
    I have installed and tried switching over to sugarcube on my current game and I am still having error. It said something about having me putting the page on somewhere so that I can access it through http... well, not a solution I am expecting.
    That is a notification that your browser lacks required capabilities, not an error. It's what any conscientious story format should be doing in the unenviable position where the browser is either so old as to simply lack the required features or, in this case, the browser is actively and willfully sabotaging locally opened web applications.

    egaskrad wrote: »
    I have been using sugarcane all these years. Does it means that I can use sugarcane when I move over to twine 2?
    No. Sugarcane is Twine 1 only.
  • Agh, this is terrible news. I've been developing a novella-length twine story for about a year now (slow work, recently broke 1000 passages) and this broke it, pretty much.

    As a guess, how much javascript would I need to learn to patch this myself? I'm joking, but kind of not. My only other solution right now seems like porting to unity or something.

    I can't port to twine 2 because I use macros that I don't know how to rewrite for twine 2.

    Anyway, this sucks enormously.
  • As a guess, how much javascript would I need to learn to patch this myself? I'm joking, but kind of not. My only other solution right now seems like porting to unity or something.
    Patch the Chromium issue in which story format? Regardless, the answer is enough to be able to write your own story format, basically.

    I can't port to twine 2 because I use macros that I don't know how to rewrite for twine 2.
    What does Twine 2 have to do with anything? The issue in question affects story formats, not the IDE/compiler you happen to be using.

    Anyway. If you want a story format which is completely immune to the Chromium issue, then you basically have two choices:
    • Harlowe - Only available for Twine 2. Syntax (incl. macros) and styling incompatible with the Twine 1 vanilla story formats. AFAIK, currently, has no way to add custom macros, so extensibility is only possible via JavaScript.
    • SugarCube 2.x - Available for both Twine 1 & 2. Syntax (incl. macros) mostly compatible with the Twine 1 vanilla story formats and SugarCube 1.x (there are some differences though). Styling incompatible with the Twine 1 vanilla story formats and SugarCube 1.x.
    So, if you're heavily invested in the Twine 1 vanilla story formats or SugarCube 1.x, then your best bet is probably SugarCube 2.x.
  • greyelf wrote: »
    2. Change to the SugarCube story format, which has been patched to stop this error.

    ...

    4. Wait until the developer (or someone else) or Sugarcane patches it.
    How was the error fixed? I'd like to look into modifying/patching it myself so that my stories will run correctly in Chrome. Not a huge issue (plus, you can always just use another browser) - but it'd be nice to not see those popups every time when building/test playing my story. :)
  • The issue is resolved by not using the HTML5 History API. Either by not using it at all (like Harlowe and SugarCube 2.x) or by making detection of its breakage part of its capability check, so the story format will fail over to another mode.
Sign In or Register to comment.