Last active
November 15, 2017 00:27
-
-
Save yamaryu0508/56cc59f1d853a6030a1b8a908f853f74 to your computer and use it in GitHub Desktop.
カスタマイズで足したテキストボックスにスクリプトが入力される
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* global.$ | |
*/ | |
jQuery.noConflict(); | |
(function ($) { | |
'use strict'; | |
kintone.events.on(['app.record.index.show'], function (event) { | |
// 値をヘッダにappendするテキストボックス生成 | |
var $input1 = $('<div class="kintoneplugin-input-outer"><input id="input1" class="kintoneplugin-input-text" type="text"></div>'); | |
$(kintone.app.getHeaderMenuSpaceElement()).append($input1); | |
var $button1 = $('<button id="button1" class="kintoneplugin-button-dialog-ok">XSS from input</button>').css({ | |
'vertical-align': 'top' | |
}); | |
$(kintone.app.getHeaderMenuSpaceElement()).append($button1); | |
$('#button1').click(function(){ | |
$(kintone.app.getHeaderMenuSpaceElement()).append( | |
$('#input1').val() | |
); | |
}); | |
return event; | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment