Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1893)

Unified Diff: Source/devtools/front_end/workspace/UISourceCode.js

Issue 1264133002: Devtools: [WIP] Implement enhanced devtools extension language APIs Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modify override dropdown to apply to console completions & transpile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/workspace/UISourceCode.js
diff --git a/Source/devtools/front_end/workspace/UISourceCode.js b/Source/devtools/front_end/workspace/UISourceCode.js
index 1b374623fc42f589f914df608d9aaf80055a6e1d..1bdbaf13094909464db5820b783d8c4d487ec234 100644
--- a/Source/devtools/front_end/workspace/UISourceCode.js
+++ b/Source/devtools/front_end/workspace/UISourceCode.js
@@ -520,12 +520,7 @@ WebInspector.UISourceCode.prototype = {
*/
extension: function()
{
- var lastIndexOfDot = this._name.lastIndexOf(".");
- var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot + 1) : "";
- var indexOfQuestionMark = extension.indexOf("?");
- if (indexOfQuestionMark !== -1)
- extension = extension.substr(0, indexOfQuestionMark);
- return extension;
+ return WebInspector.TextUtils.extension(this._name);
},
/**

Powered by Google App Engine
This is Rietveld 408576698