# HG changeset patch # User Sylvain Thénault # Date 1303997146 -7200 # Node ID cd14e03124bedc64c42ab1cfd9e4a0ac9bc0967a # Parent 9ed9e1d77ef307e414afc53c17e7548af67a1d1b# Parent 2fe2ed459e4d2351e1d89f264c73346c1b5aaac4 backport oldstable diff -r 9ed9e1d77ef3 -r cd14e03124be utils.py --- a/utils.py Wed Apr 27 15:42:07 2011 +0200 +++ b/utils.py Thu Apr 28 15:25:46 2011 +0200 @@ -230,7 +230,10 @@ Request objects use a HTMLHead instance to ease adding of javascripts and stylesheets """ - js_unload_code = u'jQuery(window).unload(unloadPageData);' + js_unload_code = u'''if (typeof(pageDataUnloaded) == 'undefined') { + jQuery(window).unload(unloadPageData); + pageDataUnloaded = true; +}''' # Making