Skip to content

Commit

Permalink
generalised video resizeing
Browse files Browse the repository at this point in the history
  • Loading branch information
hohMiyazawa committed Sep 14, 2020
1 parent 905192c commit 6374f79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/automail.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
m4_divert(-1)m4_dnl
m4_changequote(<m4<,>m4>)
m4_define(AUTOMAIL_VERSION,9.91)
m4_define(AUTOMAIL_VERSION,9.93)
m4_divert(0)m4_dnl
// ==UserScript==
// @name Automail
Expand Down
1 change: 0 additions & 1 deletion src/css/verticalNav.css
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,6 @@ div#nav.transparent{
padding: 4px;
font-size: 130%;
text-align: left;
color: rgb(var(--color-text-bright));
}
@media(max-width: 1540px){
.container{
Expand Down
6 changes: 3 additions & 3 deletions src/modules/webmResize.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ exportModule({
if(useScripts.webmResize){
setInterval(function(){
document.querySelectorAll("source").forEach(video => {
let hashMatch = (video.src || "").match(/#\d+(\.\d+)?%?$/);
let hashMatch = (video.src || "").match(/#(image)?(\d+(\.\d+)?%?)$/);
if(hashMatch && !video.parentNode.width){
video.parentNode.setAttribute("width",hashMatch[0].substring(1))
video.parentNode.setAttribute("width",hashMatch[2])
}
if(video.src.match(/#image$/)){
if(video.src.match(/#image\d*(\.\d+)?%?$/)){
video.parentNode.removeAttribute("controls")
}
})
Expand Down

0 comments on commit 6374f79

Please sign in to comment.