Greasemonkey automatically load forum redirects [duplicate] - javascript

This question already has answers here:
Modifying all links w/ Greasemonkey
(2 answers)
Closed 5 years ago.
I have very little knowledge in javascript and greasemonkey, so I hope someone here would be kind to answer this easy (I think) question!
Several forums have a redirect page when you click a link that links outside the forum, and you have to click "Continue" to load the page.
The URL of the redirect page can for example be constructed like this:
https://www.forumurl.com/out/?http://outsideurl.com
How should this Greasemonkey script to automatically load http://outsideurl.com when I visit the above forum url look like?

We could to plug ajax and write this code
$("buttonID").click(function(){$("body"/* or your favorite content*/).load( "your url")});

Related

How to change URL without refreshing the page? [duplicate]

This question already has answers here:
How do I modify the URL without reloading the page?
(20 answers)
Closed 2 years ago.
Some websites like https://featurepoints.com are using a technique in which the user opens a new page without any kind of refresh, the URL will be changed but there is no refresh or an ajax usage.
What techniques are they using? Is it pushState?
I think you might be looking for history.pushState
history.pushState([data], [title], [URL]);
Using your example of https://featurepoints.com/
history.pushState(null, 'FeaturePoints Login', 'https://featurepoints.com/login');
Source and more details https://css-tricks.com/using-the-html5-history-api/

How to Make TamperMonkey Script Work on chrome-extension:// Page [duplicate]

This question already has answers here:
Can I modify chrome://extensions/ page with JavaScript(user script)?
(3 answers)
Could I make a Google Chrome extension for chrome pages (downloads, extensions etc)?
(3 answers)
Does content_scripts matches "chrome-extension://*/*" work?
(4 answers)
Closed 5 years ago.
So this seems like it should be really simple, but I can't find it anywhere on Google. I have a certain Google Chrome extension that I've downloaded from the Chrome Extension store, and I'm trying to slightly tweak the way it displays some stuff on its chrome-extension:// page. TamperMonkey normally works great for this on a http:// page, but I can't seem to get my script to even activate for a chrome-extension:// page. Does anyone know how to accomplish this?

How to hide JavaScripts in wordpress [duplicate]

This question already has answers here:
How to prevent your JavaScript code from being stolen, copied, and viewed? [closed]
(10 answers)
Closed 5 years ago.
I have inserted my javascripts in the header.php file, but I noticed the whole code can be stolen by simply lookin at the source from within any single post or homepage...
May you suggest me a simple way to hide my javascripts in wordpress somehow to prevent being copied/stolen?
You can't hide javascript. Client always need to access it.
You can minify and uglyfy your code, so it will be hard to read it

Javascript Login [duplicate]

This question already has an answer here:
JS Simple but Safe Login? [closed]
(1 answer)
Closed 6 years ago.
I am trying to create a login page using JavaScript. It's really just a redirect page with a couple of usernames and passwords. I know how insecure it is, but its simple; plus no confidential information will be on the target pages.
I got my script from this source: http://www.javascriptkit.com/script/script2/loginpass2.shtml
Im trying to have certain usernames redirect to a particular page and I want to do that with the code given..I just don't know how.
Sorry for not being clear.
For example, when someone logs in as user 1 I want them to be redirected to a different page as user 2.
Thanks in advance. :)
Why not just do
window.location.replace(url);
Where you get url from matching a username with a url. An associated array would fit the bill

Why do many sites using "#!/" for AJAX? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?
Many Ajax sites use #!/ in their URLs. Examples include Twitter (https://twitter.com/#!/Linksku) and Grooveshark (http://grooveshark.com/#!/).
Why do they use the exclamation mark?
https://stackoverflow.com/a/4175129/1232478 links to two Google items that explain it pretty well. In short, it helps make AJAX sites crawlable.
http://googlewebmastercentral.blogspot.com/2009/10/proposal-for-making-ajax-crawlable.html
is ultimately the link.

Categories

Resources