diff --git a/frontend/config.php b/frontend/config.php index 0edc1c7..35c5310 100644 --- a/frontend/config.php +++ b/frontend/config.php @@ -50,7 +50,7 @@ // The array follows a title link structure: // "TITLE" => "LINK", $footerLinks = [ - "About" => "https://github.com/UTCWeb/utctiny#utctiny", + "About" => "https://utc.teamdynamix.com/TDClient/2717/Portal/Requests/ServiceDet?ID=50665", "Privacy" => "https://www.utc.edu/about/privacy", "Manage My Links" => "/admin/", ]; diff --git a/user/plugins/fix-youtube-titles/LICENSE b/user/plugins/fix-youtube-titles/LICENSE new file mode 100644 index 0000000..3a45f61 --- /dev/null +++ b/user/plugins/fix-youtube-titles/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013-present, The YOURLS Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/user/plugins/fix-youtube-titles/README.md b/user/plugins/fix-youtube-titles/README.md new file mode 100644 index 0000000..1210ff2 --- /dev/null +++ b/user/plugins/fix-youtube-titles/README.md @@ -0,0 +1,28 @@ +# Fix Youtube titles [![Listed in Awesome YOURLS!](https://img.shields.io/badge/Awesome-YOURLS-C5A3BE)](https://github.com/YOURLS/awesome-yourls/) + +_Without this plugin_, shortening a Youtube URL returns an incorrect title: Before you continue to YouTube (read why below) + +**With this plugin**, you get the correct title, ie Backyard Squirrel Maze 1.0- Ninja Warrior Course - YouTube + +Tested with [YOURLS](https://yourls.org) `1.8.1` and above. + +## Installation + +1. In `/user/plugins`, create a new folder named `fix-youtube-titles` or something like this +2. Drop these files in that directory. +3. Go to the Plugins administration page (eg. `http://sho.rt/admin/plugins.php`) and activate the plugin. +4. Have fun! + +## License + +Do what the hell you want with it. + +## Why is this needed? + +Youtube redirects every unknown user to a page where they need to accept their darn cookies: + + + +Your YOURLS instance is such an _unknown_ user to Google, since it has no Youtube cookie. This plugin tricks Youtube and makes it think it has one. + +🍪 FTW. diff --git a/user/plugins/fix-youtube-titles/plugin.php b/user/plugins/fix-youtube-titles/plugin.php new file mode 100644 index 0000000..7eaa4fe --- /dev/null +++ b/user/plugins/fix-youtube-titles/plugin.php @@ -0,0 +1,37 @@ + 0 ) { + // change user agent to "curl". Actually, this is enough to trick Youtube ¯\_(ツ)_/¯ + yourls_add_filter('http_user_agent', function(){return 'curl/7.68.0';}); + + // The