top.location.replace creates history item in Safari/Chrome - safari

At this point we have a photogallery which uses hashvalues to determine which picture is currently showed to the user, and to support sending the page to a friend and such. Something like:
http://url/photos/#photo-4
When we have loaded the corresponding picture after clicking the next or previous button, we change the url according to the JS 1.1 specification using:
top.location.replace(url.url + hash);
Our wanted behaviour is that no history item is being created, so users can use the back button to leave the photogallery, instead of using the back button to see the previous pictures.
In IE and Firefox the method works like a charm, but Safari and Chrome do make a history item for the changed url. I have found alot of samples how to create history items when using the hash for navigating like this, but I want to do this the other way. Any clue?

This works as expected now:
On Safari [5.1.7] location.replace() works as expected – the URL is replaced, nothing is added to the back button's queue, and nothing is added to the history menu.
On Chrome [21.0.1180.82] location.replace() is a little tricky – the URL is replaced and nothing is added to the back button's queue, but it does add an item to the history menu.
What makes this tricky is that there are two distinct history queues – the history menu and the back/forward buttons. Click and hold on the back and forward buttons to see their queue and compare with the history menu.
And the history queue of the back/forward buttons is tied to the active tab. Also, the button history remains even when you clear the history menu – at least until you close the tab.

There seems to be no solution at this point.

Have you looked at assigning your hash using window.location.hash = newHash instead of replacing the entire url?
https://developer.mozilla.org/en/DOM/window.location

Related

Disable certain suggestions in PhpStorm search

I’m not sure what are these called:
I mean the Show code with my wire stats, Show Memory indicator, etc..
Basically, I’m mostly interested so this autocomplete menu would only show files, or at the very least would prioritise files. How can this be achieved?
I’m in version 2022.2.1.
That popup is called Search Everywhere and you are on an "All" tab that includes combined results from Classes, Files, Symbols, Actions etc.
Either manually switch to the desired tab (using a mouse or by hitting Tab needed number of times) or invoke this popup for the desired search from the start. For that just use the shortcut for Navigate | File... (Ctrl + Shift + N here on Windows keymap).
https://www.jetbrains.com/help/idea/searching-everywhere.html
Found the solution.
These things are called Actions, and the can be disabled in menu that appears after clicking the small funnel icon in the top right:
I tested, these changes seem to 'survive' a restart.
Yes, at the moment it is remembered only during the session.
https://youtrack.jetbrains.com/issue/IDEA-229285 -- watch this ticket (star/vote/comment) to get notified about any progress.
(P.S. The same happens with Find in Files popup (IDEA-143972) and a few others similar popups as well)

Magnific-popup - Source (not showing up again) after closing Popup

I'm trying to implement the Magnific-popup on a website. Source is a jquery ( html articles with a header paragraphs...) object loaded as inline type. The shown source is on the same page as the popup. To this point it is working fine, popup is working, content is loaded.
Now I'm unsure whether this is standard behaviour or not: In the background the shown article is hidden, while the rest of the articles are still there. When closing the popup, the shown article stays hidden.
tl;dr: Magnific-popup hides the source of the opened information, not making it visible again after closing the popup.
Am I doing anything wrong or is it just the expected behaviour of Magnific-popup?
Any hints/solutions appreciated.
its general behavior.
when you close the popup once, it adds class "popup-hide" to hide the popup content, though which may not be applied by you in its html
i hope you are referring to something like this : http://www.hoopsvilla.com/2014/04/2014-nba-playoffs-bracket-tree-updated-scores-stats-schedule.html (when you click the trigger (the team logo), the inline-content gets hidden once the popup is closed.)
i'll try to get more (solution) on this later.. :)

Redirect URI in Google Cloud Console doesn't save

I have an old OAUTH1 project with a cliend id for web application. The problem is that I can't set redirect URIs. If I update them at https://console.developers.google.com/project/myprojectid/apiui/credential everything seems to be fine. But when I press F5, all the settings are gone. It seems as if Google doesn't store my settings. I have tried it with various browsers but still didn't work.
Has anyone else encountered this problem? Help is highly appreciated.
Actually pressing Save twice don't work (at least for me).
Instead, I have to hit enter into textbox. This adds entry into the list.
And only after that clicking Save will save the changes.
Type the redirect URL and press ENTER.
It will get added as a row.
Then click save.
Bad UI Google :( wasted some time trying to figure this out.
I think this is just an example of poor UX design. I was having the same problem, I would add a redirect URI, click the 'Save' button, see it add a new line, and assume it was saved.
I discovered that the first click of the 'Save' button only creates a new line. You have to click the 'Save' button a second time (where it will briefly change the text and color to 'Saving...'), which will save your updates and return you to the previous screen.
Step 1: Enter the URI
Step 2: click 'Save'
Step 3: Click 'Save' again
Authorized redirect URIs not saving. Because of the browser. Please change browser to Google chrome or chromium which developed by google so we can save it. I faced this problem it has eat the time for my whole day.If changed browser still not working fine, then try to clear everything(history, cache, .....) from the browser.

Share button disabled in Google Plus while sharing photos

I want to share many photos from an album. So, first I selected all and then, press the share button at top (as showed here https://support.google.com/plus/answer/1407859?hl=en), add a comment, the email of the receiver, but the share button is gray, it seems disabled. What can I do?
This is how it appears.
I encountered the same issue as well and tried putting the album name but still didn't seem to enable the Share button.
The Share button actually is not dependent on the album title, as what you suggested. The only mandatory field here is the To field, in order to share your photos properly to others.
So what I found out was that it had something to do with my slow Internet connection. After I reset my connection and refreshed my browser, it all seemed to work just fine automatically. Perhaps some things must be fully loaded first before the Share button can be enabled.
It seems working now. What I did was, added a name for the Album as shown below, and hit cancel. The next time I pressed the share button at the top it displays the window but now with the share button in green.
Thanks anyway.

SQL Developer tab issue

So dumb question here, but its driving me insane!:
In SQL developer I often accidentally drag and drop opened 'tabs' from time to time and this then adds it to a different part of the screen so you can see multiple tabs open at once. Great if you do it on purpose, not so easy to undo if by accident.
When i try to 'grab' the 'tab' and place it back where it was it doesn't let me and just drops the tab to a different part of the screen and rearranges everything else in the process.
I currently have to close the tab, find whatever i was viewing again, and open it when my other tab list is open. Hopefully that all makes sense :)
So is there not an easy way to just put the tab back in the previous pane?
I've actually had this question for months now, and ironically the same day I posted this question i accidentally stumbled upon the answer. You grab the tab, drag it over the active file in another pane you wish to add it too, and when the full square shows(centered) over the active tab you drop it.
Another way to place all of the tabs back into the same window is to right click on any tab and select the "Collapse Tab Groups" option (see image below). This will put all of the tabs back into the same window.
However if you wish to reorder the tabs within the same window you must use the way that #TheJavaBeast said by dragging it to the center.
Just wanted to add this for more information!