<commit_before>var code_block = document.getElementById('clear-code-code');
var hide  = document.getElementById('clear-code-frame-hide');
var hlcss = document.getElementById('highlight-css-link');

var js    = document.getElementById('beautify_js');
var html  = document.getElementById('beautify_html');
var css   = document.getElementById('beautify_css');
var reset = document.getElementById('beautify_reset');

var options = {};

var code  = "";

function highlight() {
  code_block.className = "";
  hljs.highlightBlock(code_block);
}

function format(beautifier, name) {
  code_block.innerHTML = code;
  if (beautifier) {
    console.log(options[name]);
    code_block.innerText = beautifier(code_block.innerText, options[name]);
  }
  highlight();
}

chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) {
  if (request.openCode) {
    code = JSON.parse(request.openCode);
    format();
  }
});

chrome.storage.local.get({ 'highlight_css_link': 'default' }, function (response) {
  hlcss.href = 'highlight/styles/' + response.highlight_css_link;
});

chrome.storage.onChanged.addListener(function (changes, namespace) {

  if (changes.highlight_css_link) {
    hlcss.href = 'highlight/styles/' + changes.highlight_css_link.newValue;
    highlight();
  }
  if (changes.js_beautifier) {
    options.js = changes.js_beautifier.newValue;
  }
  if (changes.html_beautifier) {<commit_msg>updated css href in frame<commit_after>var code_block = document.getElementById('clear-code-code');
var hide  = document.getElementById('clear-code-frame-hide');
var hlcss = document.getElementById('highlight-css-link');

var js    = document.getElementById('beautify_js');
var html  = document.getElementById('beautify_html');
var css   = document.getElementById('beautify_css');
var reset = document.getElementById('beautify_reset');

var options = {};

var code  = "";

function highlight() {
  code_block.className = "";
  hljs.highlightBlock(code_block);
}

function format(beautifier, name) {
  code_block.innerHTML = code;
  if (beautifier) {
    console.log(options[name]);
    code_block.innerText = beautifier(code_block.innerText, options[name]);
  }
  highlight();
}

chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) {
  if (request.openCode) {
    code = JSON.parse(request.openCode);
    format();
  }
});

chrome.storage.local.get({ 'css_href': 'default.css' }, function (response) {
  hlcss.href = 'highlight/styles/' + response.css_href.style;
});

chrome.storage.onChanged.addListener(function (changes, namespace) {

  if (changes.highlight_css_link) {
    hlcss.href = 'highlight/styles/' + changes.highlight_css_link.newValue;
    highlight();
  }
  if (changes.js_beautifier) {
    options.js = changes.js_beautifier.newValue;
  }
  if (changes.html_beautifier) {
{'fraction_non_alphanumeric': 0.14437367303609341, 'fraction_numerical': 0.0, 'mean_word_length': 5.002123142250531, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5735084', 'n_tokens_mistral': 913, 'n_tokens_neox': 888, 'n_words': 150}