Skip to content

Instantly share code, notes, and snippets.

@etdsoft
Created September 27, 2011 13:53
Show Gist options
  • Save etdsoft/1245099 to your computer and use it in GitHub Desktop.
Save etdsoft/1245099 to your computer and use it in GitHub Desktop.
Create new notes in Dradis and Vuln::DB with default content
// <dradispro>/public/javascripts/dx/dradis.notes.NoteEditorWindow.js
// [...]
// replace the clear() function in line #72
clear: function(){
this.fields.editor.setValue('#[Title]#\nNew Page Title\n\n#[Description]#\n \n\n#[Recommendation]#\n \n\n');
this.fields.editor.selectText();
this.fields.preview.clear();
}
// [...]
# <vulndb>/app/views/pages/new.html.erb
# replace the <script> block
# [...]
<script type="text/javascript">
$(function(){
if( $("#page_name").val() == "" )
{
prepare_default_text("#page_name", "NewPageName");
}
if( $("#page_content").val() == "" )
{
$("#page_content").val("#[Title]#\nNew Page Title\n\n#[Other field]#\nYou can have as many fields as you like!");
}
});
</script>
#[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment