/**
 * Copyright 2018 Rouslan Solomakhin
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

document.addEventListener('DOMContentLoaded', function() {
  console.log('DOMContentLoaded');
});

@@ -601,99 +601,527 @@
 */%0A%0A
-document.addEventListener('DOMContentLoaded', function() %7B%0A  console.log('DOMContentLoaded'
+chrome.browserAction.setBadgeText(%7Btext: %220%22%7D);%0A%0Afunction getPublicKey() %7B%0A  const decoded_cookie = decodeURIComponent(document.cookie);%0A  return 'hello world';%0A%7D%0A%0Afunction setPublicKey(public_key) %7B%0A  document.cookie = 'public_key=' + public_key;%0A%7D%0A%0Adocument.addEventListener('DOMContentLoaded', function() %7B%0A  document.getElementById('public_key').value = getPublicKey();%0A  document.getElementById('public_key').addEventListener('keyup', function() %7B%0A    setPublicKey(document.getElementById('public_key').value);%0A  %7D
 );%0A%7D

Save public key in cookie