Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

JavaScript inserted by CD

I have discovered this piece of code inserted into all pages made in CityDesk 2.0.19 – my own pages and those of yours that I have visited.

<script language="JavaScript">
<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
  return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

Where does it come from and what is it? It seems to be generated above any JavaScript code.

Jorgen B.
Friday, November 05, 2004

I can't find it on any of my pages.

Ruud van Soest
Friday, November 05, 2004

Might be some code added by a popup blocker you have installed. I'm no Javascript monkey though...

Guesswork
Friday, November 05, 2004

It is not inserted by CityDesk, so its either because of a virus (most likely) or it's in one of your templates...

Michael H. Pryor
Fog Creek Software
Friday, November 05, 2004

Well, it's on Terry's and Darren's sites too.

Jorgen B.
Friday, November 05, 2004

... and it's not in my templates.

Jorgen B.
Friday, November 05, 2004

It is Norton Internet Security. It adds it to every page you view.

Gary
Friday, November 05, 2004

Thanks Gary. Do you also know why. It only seems to happen when there is JavaSchript on the viewed page.

Jorgen B.
Friday, November 05, 2004

Like 'Guesswork' said, its popup blocking code.  It overrides the window.open function so javascript on pages can't call it.  And then it overrides the error handler so it just does nothing and returns true (so that when they call functions on the popped up window that isn't there, it doesn't generate a script error)

Michael H. Pryor
Fog Creek Software
Friday, November 05, 2004

Thanks guys. It had me worried for a while.

Jorgen B.
Friday, November 05, 2004

*  Recent Topics

*  Fog Creek Home