io-highlighter.html 2.09 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
<!DOCTYPE html>
<!--
  - This file is part of Adblock Plus <https://adblockplus.org/>,
  - Copyright (C) 2006-present eyeo GmbH
  -
  - Adblock Plus is free software: you can redistribute it and/or modify
  - it under the terms of the GNU General Public License version 3 as
  - published by the Free Software Foundation.
  -
  - Adblock Plus is distributed in the hope that it will be useful,
  - but WITHOUT ANY WARRANTY; without even the implied warranty of
  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  - GNU General Public License for more details.
  -
  - You should have received a copy of the GNU General Public License
  - along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>.
  -->
<html>
  <head>
    <meta charset="utf-8">
    <title>Test io-toggle.js</title>
    <link rel="stylesheet" href="../skin/common.css">
    <link rel="stylesheet" href="../skin/fonts.css">
    <link rel="stylesheet" href="../skin/desktop-options.css">
    <link rel="stylesheet" href="../smoke/css/io-highlighter.css">
    <script>
    function testSnapshot()
    {
      const comp = document.querySelector("io-highlighter");
      const img = document.querySelector("img.snapshot") ||
                  document.body.appendChild(new Image);
      img.className = 'snapshot';
      img.src = comp.toDataURL();
    }
    </script>
    <script defer src="../polyfill.js"></script>
    <script defer src="../ext/common.js"></script>
    <script defer src="../ext/content.js"></script>
    <script defer src="../common.js"></script>
    <script defer src="../i18n.js"></script>
    <script defer src="./io-highlighter.js"></script>
    <style>
    body
    {
      display: block;
    }

    io-highlighter
    {
      width: 640px;
      height: 400px;
    }
    </style>
  </head>
  <body style="background:white;">
    <io-highlighter data-max-size="800"></io-highlighter>
    <div style="text-align:center;padding:8px;width:640px;">
      <button disabled
        id="snapshot"
        style="margin:auto"
        onclick="testSnapshot()"
      >
        test snapshot
      </button>
    </div>
  </body>
</html>