Skip to content

Commit ce1b09e

Browse files
committed
Remove this.contentWindow.document check
It's not compatible with proxy servers. A cross origin error is outputted.
1 parent 9f8910c commit ce1b09e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

js/content.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function makeContent()
7070
{
7171
$("#torrent_file").val("");
7272
$("#add_button").prop("disabled",false);
73-
var d = (this.contentDocument || this.contentWindow.document);
73+
var d = this.contentDocument;
7474
if(d && (d.location.href != "about:blank"))
7575
{
7676
try { var txt = d.body.textContent ? d.body.textContent : d.body.innerText; eval(txt); } catch(e) {}
@@ -79,7 +79,7 @@ function makeContent()
7979
$(document.body).append($("<iframe name='uploadfrmurl'/>").css({visibility: "hidden"}).attr( { name: "uploadfrmurl" } ).width(0).height(0).on('load', function()
8080
{
8181
$("#url").val("");
82-
var d = (this.contentDocument || this.contentWindow.document);
82+
var d = this.contentDocument;
8383
if(d.location.href != "about:blank")
8484
try { eval(d.body.textContent ? d.body.textContent : d.body.innerText); } catch(e) {}
8585
}));

0 commit comments

Comments
 (0)