File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -37,18 +37,19 @@ BugReporter.prototype.report = function () {
3737} ;
3838window . addEventListener ( "load" , function ( event ) {
3939
40- function quoteText ( text ) {
41- return text . split ( "\n" ) . map ( function ( line ) {
40+ function quoteText ( text ) {
41+ return text . split ( "\n" ) . map ( function ( line ) {
4242 return "> " + line ;
4343 } ) . join ( "\n" ) ;
4444 }
45+
4546 var reportElement = document . createElement ( "button" ) ;
4647 reportElement . textContent = "バグ報告" ;
4748 reportElement . setAttribute ( "style" , "position:fixed; right:0;bottom:0;" ) ;
48- reportElement . addEventListener ( "click" , function ( event ) {
49+ var clickEvent = ( "ontouchstart" in window ) ? "touchend" : "click" ;
50+ reportElement . addEventListener ( clickEvent , function ( event ) {
4951 var bug = new BugReporter ( ) ;
5052 var selectedText = bug . getSelectedText ( ) . trim ( ) ;
51- console . log ( selectedText ) ;
5253 var body = 'URL : ' + bug . getURLs ( ) + "\n" ;
5354 if ( selectedText && selectedText . length > 0 ) {
5455 body += "\n" + quoteText ( selectedText ) + "\n" ;
You can’t perform that action at this time.
0 commit comments