There is no need for an add-on just to get the question ID. The following bookmarklet shows the question ID of the current question.
javascript:alert(StackExchange.question.getQuestionId());
I found this as follows:
Show source (Ctrl + U in Firefox)
Search for *17010194`, enable Highlight all
Observe a line containing:
StackExchange.question.init({votesCast:[],canViewVoteCounts:true,totalCommentCount:4,shownCommentCount:4,highlightColor:'#F4A83D',backgroundColor:'#FFF',questionId:17010194});
Use Ctrl + Shift + K to open the Web console.
Enter
StackExchange.question
and click on the result to inspect the object properties:Guess that
StackExchange.question.getQuestionId
is a function returning the question ID (type it in the Web Console).On observation that this works, put it in
javascript:alert(...)
and post an answer.