From 3382af482ff587afde51690e87644760279d3e98 Mon Sep 17 00:00:00 2001 From: Maxim Lihachev Date: Fri, 11 Nov 2016 11:08:22 +0500 Subject: [PATCH] =?UTF-8?q?=D0=95=D0=B4=D0=B8=D0=BD=D1=81=D1=82=D0=B2?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F=20=D1=82=D0=BE=D1=87=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=B2=D1=85=D0=BE=D0=B4=D0=B0:=20init(...)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gofem.html | 9 ++++++--- js/feminitives.js | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gofem.html b/gofem.html index 1daa034..f0d6fba 100644 --- a/gofem.html +++ b/gofem.html @@ -10,13 +10,13 @@ - +

Феминизатор v1.0

- - + +
@@ -34,6 +34,9 @@ + diff --git a/js/feminitives.js b/js/feminitives.js index b5dcedd..89fd290 100644 --- a/js/feminitives.js +++ b/js/feminitives.js @@ -44,6 +44,7 @@ var HTML = { container: "", _select: function(element) { return document.getElementById(this.container + "-" + element); }, input: function() { return this._select("word"); }, + button: function() { return this._select("convert"); }, dict: function() { return this._select("dict"); }, content: function() { return this._select("content"); }, full: function() { return this._select("full"); }, @@ -60,6 +61,9 @@ HTML.init = function(root) { event.preventDefault(); event.keyCode == 13 && tr(); }); + + //Конвертирование по нажатию кнопки + this.button().onclick = tr(); }; //Разбор параметров @@ -327,6 +331,7 @@ function tr(word) { //Вывод информации if (!wd) { show_help(); + return; } else if (FEM.exceptions.contains(wd)) { HTML.full().innerHTML = FEM.exceptions.definition(wd); feminitives = FEM.exceptions.feminitives(wd);