Client-side Javascript: Showing the browser's address bar when a site hides it? - show

I'm trying to make a short client-side script that will run as UserJS in something like Greasemonkey. The script is to prevent sites from hiding the browser's navigation buttons. Topic info here.
I've come up with Window(location=yes, toolbar=yes, menubar=yes); This gives a "Read-Only" error though. All the info when I search is about web authors wanting to turn off the address bar (etc), not users wanting to turn it back on.
Click a product on this page to see the problem.

Related

VueJs Address Bar

Hi friends,
The company I work for has a website with an Admin Dashboard. Pages that users can use according to their authorization are listed in the menu. Beautiful so far. However, there is a problem. The person can reach the pages that he cannot see in the menu at the moment, without authorization, from the address bar, by entering the link of the page. How can I prevent access to unauthorized pages from the Address Bar by redirecting them from one place? I don't want to check each page individually. This doesn't make sense. For example, a component with the message "You are not authorized to view this page" may be displayed or automatically redirected to the home page.
I'm waiting for your help. Thanks.
You will need to use a global router navigation guard/hook called beforeEach - as explained in multiple tutorials:
https://css-tricks.com/protecting-vue-routes-with-navigation-guards/
https://www.permify.co/post/implementing-role-based-access-control-in-vue-js

Reason SPA pages are refreshing?

Just finished learning Vuejs and after visiting a few websites that use Vuejs like;
a) https://coderstape.com
b) https://www.thenetninja.co.uk
c) https://laracasts.com
I noticed that by navigating around the websites we by clicking on navbar links and some other links then the pages refresh and I haven't been able to find out the reason online. Could someone kindly explain what's happening in that? Doesn't it go against the purpose of SPA?
For example the last site you specified: https://laracasts.com.
On its main page there is a white button "BROWSE COURSES". If you open Chrome DevTools panel(look at the picture with explanations), go to tab "Networks" (1) and then click on this white button, you can see GET request to "series?curated" (2). If you open its details, you can see that as response, new page is received in the form of an HTML code (3), not JSON for example, as is usually the case in SPA.
Also, if you look at what programming language is used on this site, for example, using service https://whatcms.org/?s=laracasts.com, you can see that this is a PHP, namely Laravel.
From all this, I can make the assumption that they use Vue.js only partially, maybe in several components, but the site navigation itself is presented in the form of traditional static pages, which is why the page reloads.
Also, for example, if you take a look at this website https://www.spendesk.com/, you can see that they use Vue.js+Nuxt.js, as well as Node.js, as indicated by service whatcms.org, and if you try to navigate to various pages on this site, you will see no page loading. I can say that this site is a true SPA in the form in which you mean it.
I heard that you can do a SPA with a Laravel backend, but I think that's another story.

Zabbix web scenario authentication

So i'm trying to set up zabbix web scenario to monitor webpage up/down. Ive found a way googeling which should work for me, however there is an issue in the login page. I need to be able to press TAB 4 times and then end it with a space to reach the login information panel. But i can not figure out how to tell zabbix to insert TABs or Spaces on the page before it attempts to login.
by default SMART-ID is our main authentication, and the order can not be changed as it would interfere with our user welfare policies. So i need to make zabbix able to navigate to the "Parool" tab for login. Also using the tab key on the page visualy does nothing untill you press the space bar, only after space bar it actually shows you where you have navigated.
So far i have tried to simply add tab and space in the "post fields" section however this does not do anything and i have not managed to google the information i require.
That's not how Zabbix Scenarios works.
Zabbix uses libCurl to check web endpoints, not a browser: you can't render javascript nor post/click to forms (ie: like Python Splinter does).
You can post data to specific web endpoints, like http://somewhere/test.php?id=2345&userid={BLABLABLA} then grab the output and/or the resulting http return code.
Please refer to the documentation for a complete overview.

fixed url on address bar - show only base url http://www.mysite.com

I need to show on the address bar just the first part of the url of my site.
For example for any page with name like
http://www.mysite.com/mypage.php or
everything else
I want to see just http://www.mysite.com on the address bar of the browser.
How this can be achieved?
I tried with apache RewriteRule but with no result.
Apart from being a really bad idea for people actually trying to use your site, there is no way you can do this on the server side, because the server needs to know which page was accessed - that's what a URL is for. What you are looking for is to make it appear to the user that they are still at the same URL.
This is easy enough if you put your entire site in an HTML frameset with one frame, or an iframe sized to fill the browser window. This does require all external links to have target="_top", and without additional JS people can break out of the frame and access the pages individually anyway.
An alternative approach, that will only work on some browsers, would be to use history.pushState to fake the address bar back to / every time a new page loads.

Timeline app appears only if page is currently liked

This is the first Facebook App i've created since the Timeline changes. Everything appears to be working the same, except for adding the app to my page's Timeline "Favorites"(?) (the boxes at the top near the About section). A large majority of the traffic to this app will come from visitors seeing the app tab on our page.
I'm attempting to add it using the following URL:
http://www.facebook.com/dialog/pagetab?app_id=MYAPPID&redirect_uri=MYAPPURL
Then I select the page, and click "Add Page Tab".
This works fine - I can then swap it's position, view the app, edit settings, etc.
I set up the tab how I want it, and then log out and visit my Facebook Page directly to view the app tab as a visitor would. The app is no longer there. Log back in, everything is fine, log back out, it's gone. It appears that if you do not already Like the page, you cannot see the app. If you do like the page, you can see it. I'd like the app to be viewable by people who do not like the page as well, as the app has a fan gate of it's own.
I've disabled Sandbox mode as well so i'm not sure what's left to do.
Any help is appreciated.
You mentioned in the comments that the app is restricted to US users:
Because your app is restricted, it won't be displayed to logged-out browsers - this is expected because unless the user is logged-in, their location and age can't be determined in order to check the restrictions you've set
If you must have the app visible to logged-out users, remove the API-level restriction and use the details passed in the signed_request to show or hide the app's content
{edit} I missed the edit to your question {/edit} - it may also be that your existing signed_request processing code is failing for logged out users