Skip to content

Commit

Permalink
support copy zawgyi and unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
saturngod committed Oct 2, 2019
1 parent a2ccaa9 commit c8501c1
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Packages/Elixir
Submodule Elixir updated 1 files
+2 −2 lib/rabbit.ex
2 changes: 1 addition & 1 deletion Packages/Go
Submodule Go updated 1 files
+8 −0 rabbit.go
2 changes: 1 addition & 1 deletion Packages/Node
Submodule Node updated 1 files
+8 −0 lib/rabbit.js
2 changes: 1 addition & 1 deletion Packages/Objc
Submodule Objc updated 1 files
+2 −2 Classes/Rabbit.m
2 changes: 1 addition & 1 deletion Packages/PHP
Submodule PHP updated 1 files
+2 −2 src/Rabbit.php
2 changes: 1 addition & 1 deletion Packages/Swift
Submodule Swift updated 1 files
+2 −2 Classes/Rabbit.swift
2 changes: 1 addition & 1 deletion Packages/ruby
Submodule ruby updated 1 files
+2 −2 lib/rabbit.rb
25 changes: 25 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ <h3>Zawgyi</h3>
<div id="textContainer">
<section id="buttons">
<input type="button" value="Clear Text" onclick="clearText()">
<input type="button" value="Copy Zawgyi" onclick="copyZawgyi()">
<input type="button" value="Copy Unicode" onclick="copyUnicode()">
</section>
</div>
<footer>
Expand Down Expand Up @@ -90,6 +92,29 @@ <h3>Zawgyi</h3>

}

function copyZawgyi() {
/* Get the text field */
var copyText = document.getElementById("zawgyi");

/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /*For mobile devices*/

/* Copy the text inside the text field */
document.execCommand("copy");
}

function copyUnicode() {
/* Get the text field */
var copyText = document.getElementById("unicode");

/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /*For mobile devices*/

/* Copy the text inside the text field */
document.execCommand("copy");
}


</script>
Expand Down

0 comments on commit c8501c1

Please sign in to comment.