Skip to content

Instantly share code, notes, and snippets.

@CAMOBAP
Last active November 6, 2021 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CAMOBAP/9244ed2d05110cfb9d6e82e18b4e6a82 to your computer and use it in GitHub Desktop.
Save CAMOBAP/9244ed2d05110cfb9d6e82e18b4e6a82 to your computer and use it in GitHub Desktop.
// https://prisoners.spring96.org/ru/table
(function(month) {
// drop header
$('.navbar').remove();
$('h2.mb-5').remove();
$('#table_length').remove();
$('#table_filter').remove();
// select month
$('select').first().val(month).change();
$('tr')[1].remove();
// drop marging/padding
$('.container').removeClass('container');
$('.content').removeClass('content');
// remove sort header
$('th').last().remove();
// drop status
$("tr").each(function() {
$(this).children("td:eq(6)").remove();
})
// drop long criminal codex description
$("tr").each(function() {
let td = $(this).children("td").eq(4);
let blames = td.html();
if (blames) {
let without_descr = blames.replace(/Уголовного кодекса .*(;)/g, '')
without_descr = without_descr.replace(/Уголовного кодекса .*/g, '');
td.text(without_descr);
}
})
// drop foother
$('#table_paginate').remove();
$('#table_info').remove();
$('footer').remove();
})(11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment