Created
September 27, 2011 13:53
-
-
Save etdsoft/1245099 to your computer and use it in GitHub Desktop.
Create new notes in Dradis and Vuln::DB with default content
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
// <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(); | |
} | |
// [...] |
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
# <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