Commit 9d7758d2 authored by George Popoff's avatar George Popoff

Добавил старый js код

parent 9cab4945
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
document.addEventListener("DOMContentLoaded", function() {
Typos_old._init();
});
var Typos_old = {
_init: function() {
this.contextBlock = $("#context-block");
this.contextBlockText = this.contextBlock.children().first();
},
/**
* Показывает окно, содержащее информацию о контексте.
* @param {type} link Элемент a.typos_context
* @returns {Boolean}
*/
handleLink: function(link) {
var text = link.getAttribute("context");
var typo = link.getAttribute("typo");
var correct = link.getAttribute("correct");
var self = this;
text = text.replace(typo, "<span class='typo'>" + typo + " -> " + correct + "</span>");
self.contextBlockText.html(text);
self.contextBlock.dialog();
return false;
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment