Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
retypos-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eterfund
retypos-server
Commits
9d7758d2
Commit
9d7758d2
authored
Mar 30, 2018
by
George Popoff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил старый js код
parent
9cab4945
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
typos_old.js
cp/javascript/typos_old.js
+37
-0
No files found.
cp/javascript/typos_old.js
0 → 100644
View file @
9d7758d2
/*
* 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
;
}
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment