diff --git a/features/features.json b/features/features.json index 4236c83f..f4e3c238 100644 --- a/features/features.json +++ b/features/features.json @@ -1,4 +1,14 @@ [ + { + "title": "Scroll Project Titles", + "description": "Allows you to scroll and view the entire title of projects that you don't own.", + "credits": ["rgantzos"], + "urls": ["https://scratch.mit.edu/users/rgantzos/"], + "file": "scroll-project-titles", + "type": ["Editor"], + "tags": ["New", "Recommended"], + "dynamic": true + }, { "title": "Search Context Menus", "description": "Hover over any username on the website to display the profile picture, username and follower count.", diff --git a/features/scroll-project-titles.js b/features/scroll-project-titles.js new file mode 100644 index 00000000..f6f52571 --- /dev/null +++ b/features/scroll-project-titles.js @@ -0,0 +1,12 @@ +ScratchTools.styles.add(` +.project-title.no-edit { + overflow-x: scroll !important; + text-overflow: clip !important; +}`, "scroll project titles") + +ScratchTools.setDisable("scroll-project-titles", function() { + if (document.querySelector(".project-title.no-edit")) { + document.querySelector(".project-title.no-edit").scrollLeft = 0 + } + ScratchTools.styles.removeStyleById("scroll project titles") +}) \ No newline at end of file