Delete files with specific extension from Downloads on open folder

Hi,
I am new to AppleScript and I apologize for asking such a simple question but I have not found the answer in any posts. I have tried many different variations but I have not been able to build a script that will delete all files with the .jsp extension from the Downloads folder when I open the folder. The most recent version I have is below. I appreciate any help!

on opening folder
	tell application "Finder"
		delete (every item of this_folder whose name extension is "jsp")
	end tell
end opening folder

Hi,

the syntax is almost correct, it’s just missing the direct parameter of the event handler


on opening folder this_folder
	tell application "Finder"
		delete (every item of this_folder whose name extension is "jsp")
	end tell
end opening folder

Worked, Thanks!