Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Release autoload variable on close

Signed-off-by: Sebastian Skuse <seb@skuse.net>
  • Loading branch information...
commit 25b169df85ab26d6e7d2ea65af565ae838827503 1 parent d8f6128
@sebskuse sebskuse authored
Showing with 5 additions and 1 deletion.
  1. +1 −1  ATBar.min.user.js
  2. +4 −0 ATBar.user.js
View
2  ATBar.min.user.js
@@ -1,3 +1,3 @@
"undefined"==typeof window.AtKit?(d=document,jf=d.createElement("script"),jf.src=("https:"==document.location.protocol?"https://ssl.atbar.org/c":"http://c.atbar.org")+"/atkit/AtKit.min.js",jf.type="text/javascript",jf.id="AtKitLib",d.getElementsByTagName("head")[0].appendChild(jf),window.AtKitLoaded=function(){var b=null;this.subscribe=function(a){b=a};this.fire=function(a,c){null!=b&&b(a,c)}},window.AtKitLoaded=new AtKitLoaded,window.AtKitLoaded.subscribe(function(){__start()})):__start();
function __start(){(function(b,a){$lib=a.lib();var c;c="https:"==document.location.protocol?"https://ssl.atbar.org/c/ATBar2/":"http://c.atbar.org/ATBar2/";var e=["ftw","resize","fonts","spellng","dictionary","insipio-tts","readability","wordprediction","css","shortcutkeys","tooltip"];a.importPlugins(e,function(){a.setLogo(c+"images/atbar.png");a.setName("ATBar");typeof b.AtKitLanguage=="undefined"?a.setLanguage("GB"):a.setLanguage(b.AtKitLanguage);a.setAbout('Version 2.0.172<p style="line-height:120%">Created by <a href="http://seb.skus.es/">Sebastian Skuse</a> and the <a href="http://access.ecs.soton.ac.uk/">Accessibility Team</a>.<br>Web and Internet Science, ECS<br>&copy; University of Southampton 2010-2012.<br><br>Fugue Icons &copy; <a href="http://www.pinvoke.com/">pinvoke</a> under Creative Commons licence, Dictionary &copy; <a href="http://en.wiktionary.org/">Wiktionary</a> under Creative Commons licence.<br><a href="http://famspam.com/facebox/">Facebox</a> jQuery plugin &copy; Chris Wanstrath under MIT licence, Portions of the spelling engine &copy; <a href="http://brandonaaron.net">Brandon Aaron</a> under MIT licence. Word prediction provided by <a href=\'http://www.aitype.com/\'>AIType</a>.</p>');
-$lib.each(e,function(b,c){a.addPlugin(c)});a.addResetFn("reset-saved",function(){a.clearStorage();typeof localStorage!=null&&localStorage.removeItem("ATBarAutoLoad")});a.render();$lib(".at-btn:first a").focus();typeof localStorage!=null&&localStorage.setItem("ATBarAutoLoad",1)})})(window,AtKit)};
+$lib.each(e,function(b,c){a.addPlugin(c)});a.addResetFn("reset-saved",function(){a.clearStorage();typeof localStorage!=null&&localStorage.removeItem("ATBarAutoLoad")});a.addCloseFn("close-saved",function(){typeof localStorage!=null&&localStorage.removeItem("ATBarAutoLoad")});a.render();$lib(".at-btn:first a").focus();typeof localStorage!=null&&localStorage.setItem("ATBarAutoLoad",1)})})(window,AtKit)};
View
4 ATBar.user.js
@@ -66,6 +66,10 @@ function __start(){
if(typeof localStorage != null) localStorage.removeItem("ATBarAutoLoad");
});
+
+ AtKit.addCloseFn('close-saved', function(){
+ if(typeof localStorage != null) localStorage.removeItem("ATBarAutoLoad");
+ });
// Run
AtKit.render();
Please sign in to comment.
Something went wrong with that request. Please try again.