How do I get past cookies consent page - javascript

The link works fine in my browser, but when I access it with requests I instead get a page asking for cookie consent. I can't to find any link in here to the normal content. At the top of the page, there is a javascript script which I believe is what is asking for the cookies. This is it:
<script type="text/javascript"
src="dtagent_ICA23jpqrx_7000100251007.js"
data-dtconfig="agentUri=dtagent_ICA23jpqrx_7000100251007.js|rid=RID_-169102772|rpid=-1264769392|domain=whirlpool.com|rt=10000|lastModification=1554899822221|lab=1|tp=500,50,0,1|reportUrl=dynaTraceMonitor|app=B2C"></script>
<script type="text/javascript"
src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
charset="UTF-8"
data-domain-script="fbd8c34f-e90b-43e9-9ab1-543aab83f925"></script>
What should I do to get past this?

Related

Has anyone figured out how to test rigorously with OneTrust Cookies?

It seems like you have to whitelist your staging or local site in order to perform test. Does anyone know a way around that? I went to their website to look through documentation, but I can find anything beyond this (At the very bottom of the page) :
<!-- OneTrust Cookies Consent Notice start for www.example-domain.com -->
<script type="text/javascript" src="https://cdn.cookielaw.org/consent/{id}-test/OtAutoBlock.js" ></script>
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" data-language="en" type="text/javascript" charset="UTF-8" data-domain-script="{id}-test" ></script>
<script type="text/javascript">
function OptanonWrapper() {}
</script>
<element class="all-other-html-below">All other HTML</element>
<script type=text/plain class="optanon-category-[category 1 through n]"></script>
I would like to test OneTrust's scripts affect on other script tags. I want to see if script tags that come after their script can be transformed from type="text/plain" to type="text/script" and see of an error is thrown. Apparently that is something that comes out of the box. But other functionality is dependent on that confirmation. But when the user consents to a cookie category there isn't a change in accepted cookies :
enter image description here
but it works on the live site :
enter image description here
Which seems like to have something to do with the fact that the domains don't match. Is there a way around this?

jQuery slider not working with https URL on a Wordpress website

I have a WowSlider that is not working when running the main page of my Wordpress website with https. The images in the slider appear stacked statically one after another. When running the Wordpress website with http, the slider works fine (provides the transition effect expected).
I am trying to figure out how to modify my website such as to launch a javascript with https, not http. I want to launch the javascript as
<script type="text/javascript" src="https://www.allbookcovers.com/skin/frontend/default/hellomini/js/jquery-1.7.1.min.js"></script> (*)
but not as
<script type="text/javascript" src="http://www.allbookcovers.com/skin/frontend/default/hellomini/js/jquery-1.7.1.min.js"></script> (**)
But since I have not been able to manually edit the source code behind the main page, I have not been able to get (*) to work.
Hence the question: How to modify the Wordpress site (php scripts?) such as to implement (*)?
I have come to understand that the problem has to do with contention between http and https.
My problem resembles the one from
jQuery slider not working in https URL
I believe the same solution will apply. I should launch the javascript using
<script type='text/javascript' src='//wp-includes/js/jquery/jquery.js?ver=1.7.1'></script>
or
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
The hypothesis above is supported by an observation from
https://www.allbookcovers.com (***)
Here a corresponding WowSlider operates fine with https.
When analyzing the code behind (***), I noticed the following:
<!-- Start wowslider.com Head section -->
<link rel="stylesheet" type="text/css" href="js/engine1/style.css" />
<script type="text/javascript" src="js/engine1/jquery.js"></script>
<!-- End WOWSlider.com section -->
<script type="text/javascript" src="https://www.allbookcovers.com/skin/frontend/default/hellomini/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="https://www.allbookcovers.com/skin/frontend/default/hellomini/js/jquery-magento-fix.js"></script>
<script type="text/javascript" src="https://www.allbookcovers.com/skin/frontend/default/hellomini/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"></script>
In my website, the javascript is launched with http, not https:
<script type="text/javascript" src="http://www.allbookcovers.com/skin/frontend/default/hellomini/js/jquery-1.7.1.min.js"></script>
I tried to comb through my Wordpress website to figure out where jquery.js was being launched. I found the following in
\\wp-includes\script-loader.php(963):
scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' ); (****)
It was not clear to me how to modify this such as to result in
<script type="text/javascript" src="https://www.allbookcovers.com/skin/frontend/default/hellomini/js/jquery-1.7.1.min.js"></script>
getting added to the main page, since (****) made no direct reference to http.
Any suggestions?
I withdraw the question. I appear to have stumbled on a solution. As I was getting ready to hand-edit the PHP files comprising my website, or even go into the PHP database and manually edit the content, I stumbled on a plugin called "Really Simple SSL". I installed the plugin. And vuha! My problems went away.

Chrome continues loading resources even after redirect with window.location

Given the following HTML/JS:
<html>
<head>
<script type="text/javascript">
window.location = '/another-url';
</script>
<link href="styles.css" rel="stylesheet" />
</head>
<body>
<img src="image.png">
</body>
</html>
Chrome will send resource requests for styles.css and image.png even though they come after what should be a page redirect. My understanding is that browsers should be loading top-to-bottom. Is there some reason for this, and is there a workaround to make sure these requests aren't being sent?
FWIW, Safari works as I would expect it to. Not sure about other browsers.
Navigating to another page (whether by setting location, clicking a link, or any other mechanism) doesn't unload the original page right away.
The browser will continue displaying (and loading) the original page until it starts receiving a response from the new page.
The most important reason for this is in case the new page serves a 204 No Content response, in which the browser will stay on the original page.

Accessing the html of an iframe with javascript/jquery

I'm working on a website which requires the user to sign in on a 3rd party website that's displayed on my website within an iframe. I'm trying to extract the html code of that website with jQuery but it doesn't really work. Here's my code.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Iframe</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
console.log($("#iframe").contents().find("body"));
});
</script>
</head>
<body>
<iframe src="https://www.google.com"></iframe>
</body>
</html>
I'm using google in my example but it's a different website I use. The result I'm getting is this - w.fn.init [prevObject: w.fn.init(0)] - but I can't find the html. Anyone who knows how to do this?
Imagine your site being able to access the content of any iframe you're including. You could simply include websites like facebook, gmail or any banking site where a user is logged in and then steal their personal information. So this is strictly forbidden by default: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
There is an "opt-in" technique, though, where the communication between parent window and iframe is possible. Basically each site/document defines the information to be transmitted and sends it using the window.postMessage() method: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
So if a message is sent from one party
window.postMessage("hello!", "http://example.com");
it may be received by the other one
window.addEventListener("message", function(e) {
console.log(e.data); // prints "hello!"
}, false);

Jquery.load URL from different folder

How do I use .load if my file is in different folder?
I have tried:
$("#messageWindow").load("http://localhost/MainFolder/Messanging/index.php");
$("#messageWindow").load("Messanging/index.php");
$("#messageWindow").load("../Messanging/index.php");
nothing works, I have read topic about different folders when using URL but I can't seem to make their answers work.
Thanks.
Okay, I have Fixed the problem The 1st and 2nd URL above WORKS but I have another problem. The index.php have tons of URLs.
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script src="../plugins/ui/jquery.ui.core.js"></script>
<script src="../plugins/ui/jquery.ui.widget.js"></script>
<script src="../plugins/ui/jquery.ui.datepicker.js"></script>
<script src="../plugins/timezone/jstz.min.js"></script>
<script type="text/javascript" src="file_js/index.js"></script>
but now those URls are not working anymore, and the solution i took was to add the whole URL.
<script type="text/javascript" src="http://localhost/MainFolder/js/jquery-1.7.2.min.js"></script>
<script src="http://localhost/MainFolder/plugins/ui/jquery.ui.core.js"></script>
<script src="http://localhost/MainFolder/plugins/ui/jquery.ui.widget.js"></script>
<script src="http://localhost/MainFolder/plugins/ui/jquery.ui.datepicker.js"></script>
<script src="http://localhost/MainFolder/plugins/timezone/jstz.min.js"></script>
<script type="text/javascript" src="http://localhost/MainFolder/Messanging/file_js/index.js"></script>
this is a hustle if I uploade the file to my web host. I think using relative pathing would do the trick but I don't know how that works.
For jQuery load() you can include the relative path from the current page or an absolute path. If you run the command below in the JS console or firebug you should see this same question twice in your browser.
$("#header").load("/questions/10643503/jquery-load-url-from-different-folder");
Content also needs to come from the same origin as the original page (you can only load content from the same domain).

Categories

Resources