<commit_before>// ==UserScript==
// @name         Google Scramble
// @namespace    googleScramble
// @include      https://www.google.com/search?*q=*
// @author       <NAME>
// @description  This user script scrambles google ranking.
// ==/UserScript==

(function(){

  var addJQuery = function(callback) {
    var script = document.createElement("script");
    script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
    script.addEventListener('load', function() {
      var script = document.createElement("script");
      script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
      document.body.appendChild(script);
    }, false);
    document.body.appendChild(script);
  };
  
  var main = function() {
    
    
    setTimeout(function() { alert(jQ("#ires li.g").length); },
               2000);
  };
  
  addJQuery(main);

})();<commit_msg>scrambles search results<commit_after>// ==UserScript==
// @name         Google Scramble
// @namespace    https://github.com/jittat/gscramble-userscript
// @include      https://www.google.com/search?*q=*
// @author       <NAME>
// @description  This user script scrambles google ranking.
// ==/UserScript==

(function(){

  var addJQuery = function(callback) {
    var script = document.createElement("script");
    script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
    script.addEventListener('load', function() {
      var script = document.createElement("script");
      script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
      document.body.appendChild(script);
    }, false);
    document.body.appendChild(script);
  };
  
  var main = function() {
    
    var shuffle = function(array) {
      // from: http://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array-in-javascript
      var counter = array.length, temp, index;
      while (counter > 0) {
        index = Math.floor(Math.random() * counter);
        counter--;
        temp = array[counter];
        array[counter] = array[index];
        array[index] = temp;
      }
      return array;
    };
    
    var resultItems = jQ("#ires li.g");
    var parent = resultItems.first().parent();
    
    resultItems.detach();
    shuffle(resultItems);
    jQ.each(resultItems, function(i,elt) {
      parent.append(elt);
    });
  };
  
  addJQuery(main);

})();
{'fraction_non_alphanumeric': 0.17140502678203542, 'fraction_numerical': 0.0057684384013185, 'mean_word_length': 2.897271268057785, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, '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': '1729220', 'n_tokens_mistral': 753, 'n_tokens_neox': 732, 'n_words': 129}