A copyright violation detector running on Wikimedia Cloud Services https://tools.wmflabs.org/copyvios/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

27 lines
741 B

  1. function update_screen_size() {
  2. var cache = cache_cookie();
  3. var data = {
  4. "width": window.screen.availWidth,
  5. "height": window.screen.availHeight
  6. }
  7. if (!cookie || cookie["width"] != data["width"] || cookie["height"] != data["height"]) {
  8. set_cookie("EarwigScreenCache", JSON.stringify(data), 1095);
  9. }
  10. }
  11. function cache_cookie() {
  12. var cookie = get_cookie("EarwigScreenCache");
  13. if (cookie) {
  14. try {
  15. data = JSON.parse(cookie);
  16. var width = data.width;
  17. var height = data.height;
  18. if (width && height) {
  19. return {"width": width, "height": height};
  20. }
  21. }
  22. catch (SyntaxError) {}
  23. }
  24. return false;
  25. }