Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

me first a pull request #7

Open
wants to merge 18 commits into
base: spokik-dev-events
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Kad.arbitr

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here should be instructions how to run your application in Readme

Пользовательский скрипт, пока не имеющий названия. Создан для сканировщиков, загружающих на сайт необходимые дела.

Функции

МД по умолчанию:
При добавлении иска на сайт, скрипт автоматически указывает тип документа.
При добавлении иска на сайт, скрипт автоматически указывает тип документа.

Горячие шаблоны:
При отсудствии зарегестрированного документа в базе, сканеровщику необходимо создать собственную карточку. Скрипт позволяет как указать быстро сторону (истца, либо ответчика) Либо заполнить все поля ( Отзыв, заявление о праавоприемстве, ходатойство о приобщении дополнительных материалов дела и так далее.
При отсудствии зарегестрированного документа в базе, сканеровщику необходимо создать собственную карточку. Скрипт позволяет как указать быстро сторону (истца, либо ответчика) Либо заполнить все поля ( Отзыв, заявление о праавоприемстве, ходатойство о приобщении дополнительных материалов дела и так далее.

Проверка повторной загрузки:
При попытке загрузить один и тот же фаил в разные дела, скрипт сообщит о потенциальной ошибке.
При попытке загрузить один и тот же фаил в разные дела, скрипт сообщит о потенциальной ошибке.

Статистика:
скрипт собирает статистику о загруженных документах. Имеет возможность построть таблицу по составам и дням.

скрипт собирает статистику о загруженных документах. Имеет возможность построть таблицу по составам и дням.
11 changes: 10 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,13 @@ import { statisticsInterface } from './modules/statisticsInterface.js'
import { addStaticOnLocalStorage } from './modules/addStaticOnLocalStorage.js'


export { windowForUserScript, defaultMD, addBattons, addTamplaties, addStaticOnLocalStorage, usersSettings, checkReload, statisticsInterface }
export {
windowForUserScript,
defaultMD,
addBattons,
addTamplaties,
addStaticOnLocalStorage,
usersSettings,
checkReload,
statisticsInterface
}
10 changes: 0 additions & 10 deletions kad.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@

"use strict";

// import { windowForUserScript } from './modules/alert.js';
// import { defaultMD } from './modules/autoMD.js';
// import { addBattons } from './modules/addBattons.js';
// import { addTamplaties } from './modules/addTamplaties.js';
// import { usersSettings } from './modules/usersSettings.js'
// import { checkReload } from './modules/checkReload.js'
// import { statisticsInterface } from './modules/statisticsInterface.js'
// import { addStaticOnLocalStorage } from './modules/addStaticOnLocalStorage.js'

import {
windowForUserScript,
defaultMD,
Expand Down
8 changes: 4 additions & 4 deletions modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ createNewScript('./modules/addStaticOnLocalStorage.js')


function createNewScript(url) {
const name = document.createElement('script')
name.setAttribute("type", "module");
name.setAttribute("src", chrome.extension.getURL(url))
head.insertBefore(name, head.lastChild);
const name = document.createElement('script')
name.setAttribute("type", "module");
name.setAttribute("src", chrome.extension.getURL(url))
head.insertBefore(name, head.lastChild);
}

Empty file added modules/12.js
Empty file.
60 changes: 30 additions & 30 deletions modules/addBattons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { usersSettings } from './usersSettings.js'

// Добавляет кнопки пользовательского интерфейса
function addBattons() {
let footer = document.createElement("div")
footer.className = "b-feedback"
let xc = sostavPerDay(usersSettings.usersSS)
footer.innerHTML = `${xc} <div id="activeStat" class="tampleteButton" style="height:23px">Статистика</div>`;
let footer = document.createElement("div")
footer.className = "b-feedback"
let xc = sostavPerDay(usersSettings.usersSS)
footer.innerHTML = `${xc} <div id="activeStat" class="tampleteButton" style="height:23px">Статистика</div>`;

let classBlok = document.createElement("style")
classBlok.innerHTML = "div.tampleteButton{height: 30px;width: 130px;-webkit-appearance: button;-webkit-writing-mode: horizontal-tb !important;color: buttontext;text-shadow: none;display: inline-block;text-align: center;align-items: flex-start;background-color: buttonface;box-sizing: border-box;margin: 0em;font: 400 13.3333px Arial;padding: 1px 6px;border-width: 2px;border-style: outset;border-color: buttonface;border-image: initial;}}";
let divBlok = document.createElement("div")
divBlok.id = "UserTempale"
divBlok.innerHTML = `
let classBlok = document.createElement("style")
classBlok.innerHTML = "div.tampleteButton{height: 30px;width: 130px;-webkit-appearance: button;-webkit-writing-mode: horizontal-tb !important;color: buttontext;text-shadow: none;display: inline-block;text-align: center;align-items: flex-start;background-color: buttonface;box-sizing: border-box;margin: 0em;font: 400 13.3333px Arial;padding: 1px 6px;border-width: 2px;border-style: outset;border-color: buttonface;border-image: initial;}}";
let divBlok = document.createElement("div")
divBlok.id = "UserTempale"
divBlok.innerHTML = `
<div id="istec" class="tampleteButton" >Истец</div>
<div id="otvetchik" class="tampleteButton">Ответчик</div>
<div id="PoObshimPravilam" class="tampleteButton">По общим</div>
Expand All @@ -22,34 +22,34 @@ function addBattons() {
<div id="otkazOtIska" class="tampleteButton">Отказ.И</div>
<div id="processualnoePravopriemstvo" class="tampleteButton">Правоприемство</div>`;

document.querySelector("#b-container > div.b-popup-wrapper.js-popup-wrapper.js-popup-wrapper--upload > div.b-popup.b-popup--blue.b-popup--upload.js-popup--upload > form > div.b-popup-button.js-upload-submit").before(classBlok)
document.querySelector("#b-container > div.b-popup-wrapper.js-popup-wrapper.js-popup-wrapper--upload > div.b-popup.b-popup--blue.b-popup--upload.js-popup--upload > form > div.b-popup-button.js-upload-submit").before(divBlok)
document.querySelector("#b-footer > div > div.b-copyright").after(footer)
document.querySelector("#b-container > div.b-popup-wrapper.js-popup-wrapper.js-popup-wrapper--upload > div.b-popup.b-popup--blue.b-popup--upload.js-popup--upload > form > div.b-popup-button.js-upload-submit").before(classBlok)
document.querySelector("#b-container > div.b-popup-wrapper.js-popup-wrapper.js-popup-wrapper--upload > div.b-popup.b-popup--blue.b-popup--upload.js-popup--upload > form > div.b-popup-button.js-upload-submit").before(divBlok)
document.querySelector("#b-footer > div > div.b-copyright").after(footer)
}

//получает масив составов, вовзращает строку " состав: штук | состав: штук ..."
function sostavPerDay(sostavs) {
let today = new Date().getDate()
let month = new Date().getMonth() + 1
let counter = {}
for (let index = 0; index < sostavs.length; index++) {
let starArray = JSON.parse(localStorage.getItem(`sostav${sostavs[index]}`))
for (let key in starArray) {
if (starArray[key].month == month) {
if (starArray[key].day == today) {
if (counter[sostavs[index]] == undefined) { counter[sostavs[index]] = 0 }
counter[sostavs[index]]++
}
}
let today = new Date().getDate()
let month = new Date().getMonth() + 1
let counter = {}
for (let index = 0; index < sostavs.length; index++) {
let starArray = JSON.parse(localStorage.getItem(`sostav${sostavs[index]}`))
for (let key in starArray) {
if (starArray[key].month == month) {
if (starArray[key].day == today) {
if (counter[sostavs[index]] == undefined) { counter[sostavs[index]] = 0 }
counter[sostavs[index]]++
}
}
}
//string stringify
let stringReturn = ''
for (let key in counter) {
}
//string stringify
let stringReturn = ''
for (let key in counter) {

stringReturn = stringReturn + `${key} состав: ${counter[key]} штук | `
}
return stringReturn
stringReturn = stringReturn + `${key} состав: ${counter[key]} штук | `
}
return stringReturn
}

export { addBattons }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check please the spelling of the filename ;)

Loading