<commit_before>// ==UserScript==
// @name       Bierdopje missende series helper
// @namespace  http://www.bierdopje.com
// @version    0.01
// @description  Toont welke series nog niet zijn toegevoegd op bierdopje
// @grant      GM_xmlhttpRequest
// @grant      GM_setClipboard
// @grant      unsafeWindow
// @match      http://www.bierdopje.com/forum/geachte-redactie/topic/1883-missende-series-in-bd-wel-in-tvdb/*
// @require    http://code.jquery.com/jquery-2.1.4.min.js
// @require    http://momentjs.com/downloads/moment-with-locales.min.js
// @copyright  2016+, <NAME>
// ==/UserScript==

if (window.top != window.self)
  return;

var BD_API_URL   = 'https://bierdopje-api.houtevelts.com';
var TVDB_API_URL = 'https://tvdb-api.houtevelts.com';
var CSS_URL      = 'https://bierdopje-api.houtevelts.com/scoped-twbs.css';

var DEBUG = true;

var COMMENT_TXT = '<tr id="replyheader-1337" name="replyheader"><td width="50" align="left" valign="middle" class="defbg postbuts" height="20"><a href="#1337"><img src="http://cdn.bierdopje.eu/g/if/forum/icon_minipost.gif" width="12" height="9" alt="Bericht" border="0"></a> <span class="postname"><a href="#" class="user user">BD MissingShowFinder</a></span> </td><td nowrap="nowrap" valign="middle" align="right" class="defbg postbuts" height="20"><p align="left">&nbsp;</p></td><td nowrap="nowrap" valign="middle" align="right" class="defbg postbuts" height="20">&nbsp;</td></tr><tr id="replyside-1337" name="replyside"><td width="150" align="left" valign="top" class="userinfo"><span class="postdetails"><br><img src="http://eih.bz/s1/2015123000.png"><br><br><br><br><br><br></span><br></td><td class="posttext" valign="top" colspan="2"><span class="postbody" id="BD__MissingShowFinder__postbody"><div class="twbs container-fluid">Dag {{username}}!</div></span><span class="gensmall"></span></td></tr>';

var NO_REQUESTS_TXT = '<p class="postcontent">Er zijn geen aanvragen gevonden door mij op deze pagina.</p>';

var MISSING_SHOWS_TXT = '<p class="postcontent">Op deze pagina heb ik <code>{{nr_missing_shows}}</code> shows gevonden die niet op Bierdopje staan! <br />Ik heb ze in een mooi overzicht gegoten voor jou:</p><table class="twbs table table-bordered table-hover table-striped"><tr><th>Show</th><th>TvDbId</th><th>Requested by</th></tr></table>';
var MISSING_SHOWS_ROW_TXT = '<tr><td><a href="{{url}}">{{showname}}</a></td><td><code>{{tvDbId}}</code><button data-tvDbId="{{tvDbId}}" type="button" class="twbs pull-right btn btn-info btn-sm" title="Kopier id naar klembord"><span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span></button></td><td></td></tr>';

var AVAILABLE_SHOWS_TXT = '<p class="postcontent">Er zijn op deze pagina <code>{{nr_available_shows}}</code> shows die wél op Bierdopje staan!</p><div class="twbs container-fluid"><table class="twbs table table-bordered table-hover table-striped"><tr><th>Show</th><th>Url</th><th>Requested by</th></tr></table></div>';
var AVAILABLE_SHOWS_ROW_TXT = '<tr><td><a href="{{url}}">{{showname}}</a></td><td><code>{{url_slug}}</code><button data-url="{{url}}" type="button" class="twbs pull-right btn btn-info btn-sm" title="Kopier url naar klembord"><span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span></button></td><td></td></tr>';

var USER_REQUEST_TXT = '{{username}}<sup><a href="{{permalink}}" title="{{time}}">comment</a></sup><br />';

var windowLocation = window.location.href.split("#")[0];
var tvDbId_comments = {};

$(function() {
  /* Inject bootstrap */
  //https://raw.githubusercontent.com/homeyer/scoped-twbs/
  var pageHead = document.getElementsByTagName("HEAD")[0];
  var link = window.document.createElement('link');
  link.rel = 'stylesheet';
  link.type = 'text/css';
  link.href = CSS_URL;
  pageHead.insertBefore(link,pageHead.lastChild);
  
  $(document).on('click', 'button[data-tvdbid]', function(e) {
    var button = $(this);
    var tvDbId = button.attr('data-tvdbid');
    GM_setClipboard(tvDbId);
  });
  
  $(document).on('click', 'button[data-url]', function(e) {
    var button = $(this);
    var url = button.attr('data-url');
    GM_setClipboard(url);
  });
  <commit_msg>Set momentjs locale to nl<commit_after>// ==UserScript==
// @name       Bierdopje missende series helper
// @namespace  http://www.bierdopje.com
// @version    0.01
// @description  Toont welke series nog niet zijn toegevoegd op bierdopje
// @grant      GM_xmlhttpRequest
// @grant      GM_setClipboard
// @grant      unsafeWindow
// @match      http://www.bierdopje.com/forum/geachte-redactie/topic/1883-missende-series-in-bd-wel-in-tvdb/*
// @require    http://code.jquery.com/jquery-2.1.4.min.js
// @require    http://momentjs.com/downloads/moment-with-locales.min.js
// @copyright  2016+, <NAME>
// ==/UserScript==

if (window.top != window.self)
  return;

var BD_API_URL   = 'https://bierdopje-api.houtevelts.com';
var TVDB_API_URL = 'https://tvdb-api.houtevelts.com';
var CSS_URL      = 'https://bierdopje-api.houtevelts.com/scoped-twbs.css';

var DEBUG = true;

var COMMENT_TXT = '<tr id="replyheader-1337" name="replyheader"><td width="50" align="left" valign="middle" class="defbg postbuts" height="20"><a href="#1337"><img src="http://cdn.bierdopje.eu/g/if/forum/icon_minipost.gif" width="12" height="9" alt="Bericht" border="0"></a> <span class="postname"><a href="#" class="user user">BD MissingShowFinder</a></span> </td><td nowrap="nowrap" valign="middle" align="right" class="defbg postbuts" height="20"><p align="left">&nbsp;</p></td><td nowrap="nowrap" valign="middle" align="right" class="defbg postbuts" height="20">&nbsp;</td></tr><tr id="replyside-1337" name="replyside"><td width="150" align="left" valign="top" class="userinfo"><span class="postdetails"><br><img src="http://eih.bz/s1/2015123000.png"><br><br><br><br><br><br></span><br></td><td class="posttext" valign="top" colspan="2"><span class="postbody" id="BD__MissingShowFinder__postbody"><div class="twbs container-fluid">Dag {{username}}!</div></span><span class="gensmall"></span></td></tr>';

var NO_REQUESTS_TXT = '<p class="postcontent">Er zijn geen aanvragen gevonden door mij op deze pagina.</p>';

var MISSING_SHOWS_TXT = '<p class="postcontent">Op deze pagina heb ik <code>{{nr_missing_shows}}</code> shows gevonden die niet op Bierdopje staan! <br />Ik heb ze in een mooi overzicht gegoten voor jou:</p><table class="twbs table table-bordered table-hover table-striped"><tr><th>Show</th><th>TvDbId</th><th>Requested by</th></tr></table>';
var MISSING_SHOWS_ROW_TXT = '<tr><td><a href="{{url}}">{{showname}}</a></td><td><code>{{tvDbId}}</code><button data-tvDbId="{{tvDbId}}" type="button" class="twbs pull-right btn btn-info btn-sm" title="Kopier id naar klembord"><span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span></button></td><td></td></tr>';

var AVAILABLE_SHOWS_TXT = '<p class="postcontent">Er zijn op deze pagina <code>{{nr_available_shows}}</code> shows die wél op Bierdopje staan!</p><div class="twbs container-fluid"><table class="twbs table table-bordered table-hover table-striped"><tr><th>Show</th><th>Url</th><th>Requested by</th></tr></table></div>';
var AVAILABLE_SHOWS_ROW_TXT = '<tr><td><a href="{{url}}">{{showname}}</a></td><td><code>{{url_slug}}</code><button data-url="{{url}}" type="button" class="twbs pull-right btn btn-info btn-sm" title="Kopier url naar klembord"><span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span></button></td><td></td></tr>';

var USER_REQUEST_TXT = '{{username}}<sup><a href="{{permalink}}" title="{{time}}">comment</a></sup><br />';

var windowLocation = window.location.href.split("#")[0];
var tvDbId_comments = {};

$(function() {
  /* Inject bootstrap */
  //https://raw.githubusercontent.com/homeyer/scoped-twbs/
  var pageHead = document.getElementsByTagName("HEAD")[0];
  var link = window.document.createElement('link');
  link.rel = 'stylesheet';
  link.type = 'text/css';
  link.href = CSS_URL;
  pageHead.insertBefore(link,pageHead.lastChild);

  moment.locale('nl');

  $(document).on('click', 'button[data-tvdbid]', function(e) {
    var button = $(this);
    var tvDbId = button.attr('data-tvdbid');
    GM_setClipboard(tvDbId);
  });
  
  $(document).on('click', 'button[data-url]', function(e) {
    var button = $(this);
    var url = button.attr('data-url');
    GM_setClipboard(url);
  });
  
{'fraction_non_alphanumeric': 0.21226641111643507, 'fraction_numerical': 0.01317680881648299, 'mean_word_length': 5.636724960254372, 'pattern_counts': {'":': 0, '<': 225, '<?xml version=': 0, '>': 225, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4123097', 'n_tokens_mistral': 3072, 'n_tokens_neox': 2966, 'n_words': 523}