diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 824cdc5c5..3d9987c71 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -455,6 +455,8 @@ def changedetection_app(config=None, datastore_o=None): update_obj = {'url': form.url.data.strip(), 'minutes_between_check': form.minutes_between_check.data, + 'seconds_between_check': form.seconds_between_check.data, + 'minutes_or_seconds': form.minutes_or_seconds.data, 'tag': form.tag.data.strip(), 'title': form.title.data.strip(), 'headers': form.headers.data, @@ -1107,7 +1109,7 @@ def ticker_thread_check_time_launch_checks(): # If they supplied an individual entry minutes to threshold. if 'minutes_between_check' in watch and watch['minutes_between_check'] is not None: # Cast to int just incase #160, kluge for checks in seconds - max_time = int(watch['minutes_between_check']) * 60 + max_time = int(watch['minutes_between_check']) * 60 #(1 if watch['use_seconds'] else 60) else: # Default system wide. max_time = int(copied_datastore.data['settings']['requests']['minutes_between_check']) * 60 diff --git a/changedetectionio/forms.py b/changedetectionio/forms.py index bd40435a7..5694007b5 100644 --- a/changedetectionio/forms.py +++ b/changedetectionio/forms.py @@ -249,6 +249,9 @@ class watchForm(commonSettingsForm): minutes_between_check = html5.IntegerField('Maximum time in minutes until recheck', [validators.Optional(), validators.NumberRange(min=1)]) + seconds_between_check = html5.IntegerField('Maximum time in seconds until recheck', + [validators.Optional(), validators.NumberRange(min=1,max=59)]) + minutes_or_seconds = RadioField('Minutes or Seconds', choices=[('minutes','Minutes'),('seconds','Seconds')]) css_filter = StringField('CSS/JSON/XPATH Filter', [ValidateCSSJSONXPATHInput()]) title = StringField('Title') diff --git a/changedetectionio/static/js/tabs.js b/changedetectionio/static/js/tabs.js index 36fecf709..98fbd790a 100644 --- a/changedetectionio/static/js/tabs.js +++ b/changedetectionio/static/js/tabs.js @@ -1,10 +1,13 @@ // Rewrite this is a plugin.. is all this JS really 'worth it?' - +// display correct label and messages for minutes or seconds +document.addEventListener("DOMContentLoaded", function(event) { + use_seconds_change(); +}); window.addEventListener('hashchange', function() { var tabs = document.getElementsByClassName('active'); while (tabs[0]) { - tabs[0].classList.remove('active') + tabs[0].classList.remove('active'); } set_active_tab(); }, false); @@ -37,7 +40,7 @@ function focus_error_tab() { var tabs = document.querySelectorAll('.tabs li a'),i; for (i = 0; i < tabs.length; ++i) { var tab_name=tabs[i].hash.replace('#',''); - var pane_errors=document.querySelectorAll('#'+tab_name+' .error') + var pane_errors=document.querySelectorAll('#'+tab_name+' .error'); if (pane_errors.length) { document.location.hash = '#'+tab_name; return true; @@ -46,6 +49,38 @@ function focus_error_tab() { return false; } - - - +function use_seconds_change() { + // var isChecked = document.querySelectorAll('input[id="use_seconds"]:checked').length + // var labelIntegerField = document.querySelector("label[for=minutes_between_check]"); + // var msgDefault = document.getElementById("minutes-message-default"); + // var msgNonDefault = document.getElementById("minutes-message-non-default"); + // var msgWarning = document.getElementById("seconds-warning"); + // if (isChecked) { + // labelIntegerField.innerHTML = "Maximum time in seconds until recheck"; + // try { + // msgDefault.style.display = "none"; + // } catch(error) { + //continue, won't be present if not default interval + // } + // try { + // msgNonDefault.style.display = "none"; + // } catch(error) { + //continue, won't be present if not default interval + // } + // msgWarning.style.display = ""; + // } + // else { + // labelIntegerField.innerHTML = "Maximum time in minutes until recheck"; + // try { + // msgDefault.style.display = ""; + // } catch(error) { + //continue, won't be present if not default interval + // } + // try { + // msgNonDefault.style.display = ""; + // } catch(error) { + //continue, won't be present if not default interval + // } + // msgWarning.style.display = "none"; + // } +} \ No newline at end of file diff --git a/changedetectionio/static/styles/styles.css b/changedetectionio/static/styles/styles.css index 687e395ae..babd1b267 100644 --- a/changedetectionio/static/styles/styles.css +++ b/changedetectionio/static/styles/styles.css @@ -1,860 +1 @@ -body { - color: #333; - background: #262626; -} -.pure-table-even { - background: #f2f2f2; -} -.pure-table-odd { - background: #fff; -} -a { - text-decoration: none; - color: #1b98f8; -} -a.github-link { - color: #fff; -} -.pure-menu-horizontal { - background: #fff; - padding: 5px; - display: flex; - justify-content: space-between; - border-bottom: 2px solid #ed5900; - align-items: center; -} -section.content { - padding-top: 5em; - padding-bottom: 5em; - flex-direction: column; - display: flex; - align-items: center; - justify-content: center; -} -.search-box input { - width: 32px; - border: none; - background-image: url(/static/images/search.svg); - background-position: 10px 10px; - background-repeat: no-repeat; - padding: 16px 0px 16px 16px; - -webkit-transition: left 0.4s ease-in-out; - transition: left 0.4s ease-in-out; - color: transparent; -} -.search-box input:hover { - cursor: pointer; -} -.search-box input:focus { - width: 150px; - padding-left: 48px; - cursor: text; - color: #333; -} -.search-box input:(not:focus) { - cursor: default; -} -.search-box input::placeholder-shown { - cursor: text; -} -.search-box input:not(:placeholder-shown) { - width: 150px; - padding-left: 48px; - color: #333; -} -.search-box input::placeholder { - opacity: 0; -} -.search-box input:focus::placeholder { - opacity: 1; -} -.search-box input:not(:-ms-input-placeholder) { - width: 150px; - padding-left: 48px; - color: #333; -} -.search-box .search-box input:not(:-moz-placeholder) { - width: 150px; - padding-left: 48px; - color: #333; -} -.search-box .search-box input::not(:-moz-placeholder) { - width: 150px; - padding-left: 48px; - color: #333; -} -.search-box .search-box input:not(:-webkit-input-placeholder) { - width: 150px; - padding-left: 48px; - color: #333; -} -.search-box .search-box input::not(:-webkit-input-placeholder) { - width: 150px; - padding-left: 48px; - color: #333; -} -.box { - width: 80%; - flex-direction: column; - display: flex; - justify-content: center; -} -.watch-table { - width: 100%; -} -#header { - vertical-align: middle; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Old versions of Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; /* Non-prefixed version, currently - supported by Chrome, Edge, Opera and Firefox */ -} -#add-paused > label { - color: #fff; - font-weight: normal; -} -.watch-table .clickable { - cursor: pointer; -} -.watch-table .sortarrow { - color: #0078e7; -} -.watch-table .hidden-col { - display: none; -} -.watch-table tr.unviewed { - font-weight: bold; -} -.watch-table .error { - color: #a00; -} -.watch-table td { - font-size: 80%; - white-space: nowrap; -} -.watch-table td.title-col { - word-break: break-all; - white-space: normal; -} -.watch-table th { - white-space: nowrap; -} -.watch-table .title-col a[target="_blank"]::after, -.watch-table .current-diff-url::after { - content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==); - margin: 0 3px 0 5px; -} -.watch-tag-list { - color: #e70069; - white-space: nowrap; -} -#watch-actions { - display: inline-block; -} -.box { - max-width: 80%; - flex-direction: column; - display: flex; - justify-content: center; -} -#flexlayout { - float: right; -} -#categories { - text-align: left; - margin-top: auto; -} -#controls-top { - text-align: right; - margin-top: auto; -} -#post-list-buttons { - text-align:right; - padding:0; - margin:0 -} -#post-list-buttons li { - display:inline-block -} -#post-list-buttons a { - border-top-left-radius:initial; - border-top-right-radius:initial; - border-bottom-left-radius:5px; - border-bottom-right-radius:5px; -} -#post-list-buttons-top-grid { - margin: 0px; -} -#post-list-buttons-top-grid li { - list-style-type: none; -} -#checkbox-functions ul { - padding-left: 0px; -} -#checkbox-functions { - position: fixed; - z-index: 1; - text-align: left; - font-family: monospace; - display: grid; - display: -ms-grid; /* IE grid support */ - -ms-grid-columns: 1fr; /* IE grid support */ -} -#grid-item-1 { /* IE grid support */ - -ms-grid-column: 1; - -ms-grid-row: 1; -} -#grid-item-2 { /* IE grid support */ - -ms-grid-column: 1; - -ms-grid-row: 2; -} -#grid-item-3 { /* IE grid support */ - -ms-grid-column: 1; - -ms-grid-row: 3; -} -#grid-item-4 { /* IE grid support */ - -ms-grid-column: 1; - -ms-grid-row: 4; -} -#grid-item-5 { /* IE grid support */ - -ms-grid-column: 1; - -ms-grid-row: 5; -} -#checkbox-functions .pure-button { - background: #0078e7; - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; -} -#recheck-and-rss { - margin-top: auto; -} -#recheck-and-rss ul { - display: inline-flex; -} -#controls-bottom { - text-align: right; - margin-bottom: auto; - direction: rtl; - } -body:after { - content: ""; - background: linear-gradient(130deg, #ff7a18, #af002d 41.07%, #319197 76.05%); -} -body:after, -body:before { - display: block; - height: 600px; - position: absolute; - top: 0; - left: 0; - width: 100%; - z-index: -1; -} -body::after { - opacity: 0.91; -} -body::before { - content: ""; - background-image: url(../images/gradient-border.png); -} -body:before { - background-size: cover; -} -body:after, -body:before { - -webkit-clip-path: polygon( - 100% 0, - 0 0, - 0 77.5%, - 1% 77.4%, - 2% 77.1%, - 3% 76.6%, - 4% 75.9%, - 5% 75.05%, - 6% 74.05%, - 7% 72.95%, - 8% 71.75%, - 9% 70.55%, - 10% 69.3%, - 11% 68.05%, - 12% 66.9%, - 13% 65.8%, - 14% 64.8%, - 15% 64%, - 16% 63.35%, - 17% 62.85%, - 18% 62.6%, - 19% 62.5%, - 20% 62.65%, - 21% 63%, - 22% 63.5%, - 23% 64.2%, - 24% 65.1%, - 25% 66.1%, - 26% 67.2%, - 27% 68.4%, - 28% 69.65%, - 29% 70.9%, - 30% 72.15%, - 31% 73.3%, - 32% 74.35%, - 33% 75.3%, - 34% 76.1%, - 35% 76.75%, - 36% 77.2%, - 37% 77.45%, - 38% 77.5%, - 39% 77.3%, - 40% 76.95%, - 41% 76.4%, - 42% 75.65%, - 43% 74.75%, - 44% 73.75%, - 45% 72.6%, - 46% 71.4%, - 47% 70.15%, - 48% 68.9%, - 49% 67.7%, - 50% 66.55%, - 51% 65.5%, - 52% 64.55%, - 53% 63.75%, - 54% 63.15%, - 55% 62.75%, - 56% 62.55%, - 57% 62.5%, - 58% 62.7%, - 59% 63.1%, - 60% 63.7%, - 61% 64.45%, - 62% 65.4%, - 63% 66.45%, - 64% 67.6%, - 65% 68.8%, - 66% 70.05%, - 67% 71.3%, - 68% 72.5%, - 69% 73.6%, - 70% 74.65%, - 71% 75.55%, - 72% 76.35%, - 73% 76.9%, - 74% 77.3%, - 75% 77.5%, - 76% 77.45%, - 77% 77.25%, - 78% 76.8%, - 79% 76.2%, - 80% 75.4%, - 81% 74.45%, - 82% 73.4%, - 83% 72.25%, - 84% 71.05%, - 85% 69.8%, - 86% 68.55%, - 87% 67.35%, - 88% 66.2%, - 89% 65.2%, - 90% 64.3%, - 91% 63.55%, - 92% 63%, - 93% 62.65%, - 94% 62.5%, - 95% 62.55%, - 96% 62.8%, - 97% 63.3%, - 98% 63.9%, - 99% 64.75%, - 100% 65.7% - ); - clip-path: polygon( - 100% 0, - 0 0, - 0 77.5%, - 1% 77.4%, - 2% 77.1%, - 3% 76.6%, - 4% 75.9%, - 5% 75.05%, - 6% 74.05%, - 7% 72.95%, - 8% 71.75%, - 9% 70.55%, - 10% 69.3%, - 11% 68.05%, - 12% 66.9%, - 13% 65.8%, - 14% 64.8%, - 15% 64%, - 16% 63.35%, - 17% 62.85%, - 18% 62.6%, - 19% 62.5%, - 20% 62.65%, - 21% 63%, - 22% 63.5%, - 23% 64.2%, - 24% 65.1%, - 25% 66.1%, - 26% 67.2%, - 27% 68.4%, - 28% 69.65%, - 29% 70.9%, - 30% 72.15%, - 31% 73.3%, - 32% 74.35%, - 33% 75.3%, - 34% 76.1%, - 35% 76.75%, - 36% 77.2%, - 37% 77.45%, - 38% 77.5%, - 39% 77.3%, - 40% 76.95%, - 41% 76.4%, - 42% 75.65%, - 43% 74.75%, - 44% 73.75%, - 45% 72.6%, - 46% 71.4%, - 47% 70.15%, - 48% 68.9%, - 49% 67.7%, - 50% 66.55%, - 51% 65.5%, - 52% 64.55%, - 53% 63.75%, - 54% 63.15%, - 55% 62.75%, - 56% 62.55%, - 57% 62.5%, - 58% 62.7%, - 59% 63.1%, - 60% 63.7%, - 61% 64.45%, - 62% 65.4%, - 63% 66.45%, - 64% 67.6%, - 65% 68.8%, - 66% 70.05%, - 67% 71.3%, - 68% 72.5%, - 69% 73.6%, - 70% 74.65%, - 71% 75.55%, - 72% 76.35%, - 73% 76.9%, - 74% 77.3%, - 75% 77.5%, - 76% 77.45%, - 77% 77.25%, - 78% 76.8%, - 79% 76.2%, - 80% 75.4%, - 81% 74.45%, - 82% 73.4%, - 83% 72.25%, - 84% 71.05%, - 85% 69.8%, - 86% 68.55%, - 87% 67.35%, - 88% 66.2%, - 89% 65.2%, - 90% 64.3%, - 91% 63.55%, - 92% 63%, - 93% 62.65%, - 94% 62.5%, - 95% 62.55%, - 96% 62.8%, - 97% 63.3%, - 98% 63.9%, - 99% 64.75%, - 100% 65.7% - ); -} -.arrow { - border: solid #000; - border-width: 0 3px 3px 0; - display: inline-block; - padding: 3px; -} -.arrow.right { - transform: rotate(-45deg); - -webkit-transform: rotate(-45deg); -} -.arrow.left { - transform: rotate(135deg); - -webkit-transform: rotate(135deg); -} -.arrow.up { - transform: rotate(-135deg); - -webkit-transform: rotate(-135deg); -} -.arrow.down { - transform: rotate(45deg); - -webkit-transform: rotate(45deg); -} -.button-small { - font-size: 85%; -} -.fetch-error { - padding-top: 1em; - font-size: 60%; - max-width: 400px; - display: block; -} -.button-secondary { - color: #fff; - border-radius: 4px; - text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); -} -.button-success { - background: #1cb841; -} -.button-tag { - background: #636363; - color: #fff; - font-size: 65%; - border-bottom-left-radius: initial; - border-bottom-right-radius: initial; -} -#checkbox-functions .pure-button.button-tag.danger { - background: #e70069; -} -.button-tag.active { - background: #9c9c9c; - font-weight: bold; -} -.button-error { - background: #ca3c3c; -} -.button-warning { - background: #df7514; -} -.button-secondary { - background: #42b8dd; -} -.button-cancel { - background: #c8c8c8; -} -.messages li { - list-style: none; - padding: 1em; - border-radius: 10px; - color: #fff; - font-weight: bold; -} -.messages li.message { - background: rgba(255, 255, 255, 0.2); -} -.messages li.error { - background: rgba(255, 1, 1, 0.5); -} -.messages li.notice { - background: rgba(255, 255, 255, 0.5); -} -#notification-customisation { - border: 1px solid #ccc; - padding: 1rem; - border-radius: 5px; -} -#token-table.pure-table td, -#token-table.pure-table th { - font-size: 80%; -} -#new-watch-form { - background: rgba(0, 0, 0, 0.05); - padding: 1em; - border-radius: 10px; - margin-bottom: 1em; -} -#new-watch-form .label { - display: none; -} -#new-watch-form legend { - color: #fff; -} -#diff-col { - padding-left: 40px; -} -#diff-jump { - position: fixed; - left: 0; - top: 120px; - background: #fff; - padding: 10px; - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - box-shadow: 5px 0 5px -2px #888; -} -#diff-jump a { - color: #1b98f8; - cursor: grabbing; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; - -o-user-select: none; -} -footer { - padding: 10px; - background: #fff; - color: #444; -} -#feed-icon { - vertical-align: middle; -} -.sticky-tab { - position: absolute; - top: 80px; - font-size: 11px; - background: #fff; - padding: 10px; -} -.sticky-tab#left-sticky { - left: 0; -} -.sticky-tab#right-sticky { - right: 0; -} -#new-version-text a { - color: #e07171; -} -.chkbox, .chkbox-header { - padding-right: 0px !important; -} -.chkbox { - text-align: center; - padding-left: 0px !important; -} -.pause-resume-header { - opacity: 0.8; -} -.pause-resume, .pause-resume-header { - padding-left: 0px !important; - padding-right: 0px !important; - text-align: center; -} -.pause-resume img { - opacity: 0.2; -} -.pause-resume:hover img { - opacity: 0.8; -} -.monospaced-textarea textarea { - width: 100%; - font-family: monospace; - white-space: pre; - overflow-wrap: normal; - overflow-x: scroll; -} -.pure-form .pure-control-group, -.pure-form .pure-group, -.pure-form .pure-controls { - padding-bottom: 1em; -} -.pure-form .pure-control-group div, -.pure-form .pure-group div, -.pure-form .pure-controls div { - margin: 0; -} -.pure-form .error input { - background-color: #ffebeb; -} -.pure-form ul.errors { - padding: 0.5em 0.6em; - border: 1px solid #d00; - border-radius: 4px; - vertical-align: middle; - -webkit-box-sizing: border-box; - box-sizing: border-box; -} -.pure-form ul.errors li { - margin-left: 1em; - color: #d00; -} -.pure-form label { - font-weight: bold; -} -.pure-form textarea { - width: 100%; -} -.pure-form ul#fetch_backend { - margin: 0; - list-style: none; -} -.pure-form ul#fetch_backend > li > * { - display: inline-block; -} -@media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width: 1024px) { - .box { - max-width: 95%; - } - .watch-table { - display: inline-block; - } - .search-box input[type=text]:focus,input[type=text]:not(:placeholder-shown) { - width: 150px; - } - .pure-form fieldset { - padding: 0; - } - .edit-form { - padding: 0.5em; - margin: 0; - } - #nav-menu { - overflow-x: scroll; - } - .pause-resume img { - opacity: 0.8; - } - #watch-actions { - margin-top: 3px; - } - .watch-table thead { - border-bottom: 1px solid #cbcbcb; - } - .chkbox, .chkbox-header, .pause-resume, .pause-resume-header{ - padding: .5em 1em !important; - text-align: left; - } -} -@media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width: 1024px) { - input[type="text"] { - width: 100%; - } - .search-box input { - width: 32px; - } - .watch-table thead, - .watch-table tbody, - .watch-table th, - .watch-table td, - .watch-table tr { - display: block; - } - .watch-table .last-checked::before { - color: #555; - content: "Checked "; - } - .watch-table .last-changed::before { - color: #555; - content: "Changed "; - } - .watch-table th:nth-child(0) { - display: none; - } - .watch-table th:nth-child(1) { - display: inline-block; - } - .watch-table th:nth-child(2) { - display: inline-block; - } - .watch-table td:nth-child(1) { - display: inline-block; - } - .watch-table td:nth-child(2) { - display: inline-block; - } - .watch-table th:nth-child(3) { - display: inline-block; - } - .watch-table th:nth-child(4) { - display: none; - } - .watch-table th:nth-child(5) { - display: inline-block; - } - .watch-table th:nth-child(6) { - display: none; - } - .watch-table th:nth-child(7) { - display: inline-block; - } - .watch-table th:nth-child(8) { - display: none; - } - .watch-table th:nth-child(9) { - display: none; - } - .watch-table .pure-table td, - .watch-table .pure-table th { - border: none; - } - .watch-table td { - border: none; - border-bottom: 1px solid #eee; - } - .watch-table td:before { - top: 6px; - left: 6px; - width: 45%; - padding-right: 10px; - white-space: nowrap; - } -} -@media only screen and (min-width: 761px) { - .m-d { - min-width: 80%; - } -} -.tabs ul { - margin: 0; - padding: 0; - display: block; -} -.tabs ul li { - margin-right: 3px; - display: inline-block; - color: #fff; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - background-color: rgba(255, 255, 255, 0.2); -} -.tabs ul li.active, -.tabs ul li :target { - background-color: #fff; -} -.tabs ul li.active a, -.tabs ul li :target a { - color: #222; - font-weight: bold; -} -.tabs ul li a { - display: block; - padding: 0.8em; - color: #fff; -} -.pure-form-stacked > div:first-child { - display: block; -} -.edit-form { - min-width: 70%; -} -.edit-form .tab-pane-inner { - padding: 0; -} -.edit-form .tab-pane-inner:not(:target) { - display: none; -} -.edit-form .tab-pane-inner:target { - display: block; -} -.edit-form .box-wrap { - position: relative; -} -.edit-form .inner { - background: #fff; - padding: 20px; -} -.edit-form #actions { - display: block; - background: #fff; -} +body{color:#333;background:#262626}.pure-table-even{background:#fff}a{text-decoration:none;color:#1b98f8}a.github-link{color:#fff}.pure-menu-horizontal{background:#fff;padding:5px;display:flex;justify-content:space-between;border-bottom:2px solid #ed5900;align-items:center}section.content{padding-top:5em;padding-bottom:5em;flex-direction:column;display:flex;align-items:center;justify-content:center}.watch-table{width:100%}.watch-table tr.unviewed{font-weight:bold}.watch-table .error{color:#a00}.watch-table td{font-size:80%;white-space:nowrap}.watch-table td.title-col{word-break:break-all;white-space:normal}.watch-table th{white-space:nowrap}.watch-table .title-col a[target="_blank"]::after,.watch-table .current-diff-url::after{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==);margin:0 3px 0 5px}.watch-tag-list{color:#e70069;white-space:nowrap}.box{max-width:80%;flex-direction:column;display:flex;justify-content:center}#post-list-buttons{text-align:right;padding:0;margin:0}#post-list-buttons li{display:inline-block}#post-list-buttons a{border-top-left-radius:initial;border-top-right-radius:initial;border-bottom-left-radius:5px;border-bottom-right-radius:5px}body:after{content:"";background:linear-gradient(130deg, #ff7a18, #af002d 41.07%, #319197 76.05%)}body:after,body:before{display:block;height:600px;position:absolute;top:0;left:0;width:100%;z-index:-1}body::after{opacity:.91}body::before{content:"";background-image:url(../images/gradient-border.png)}body:before{background-size:cover}body:after,body:before{-webkit-clip-path:polygon(100% 0, 0 0, 0 77.5%, 1% 77.4%, 2% 77.1%, 3% 76.6%, 4% 75.9%, 5% 75.05%, 6% 74.05%, 7% 72.95%, 8% 71.75%, 9% 70.55%, 10% 69.3%, 11% 68.05%, 12% 66.9%, 13% 65.8%, 14% 64.8%, 15% 64%, 16% 63.35%, 17% 62.85%, 18% 62.6%, 19% 62.5%, 20% 62.65%, 21% 63%, 22% 63.5%, 23% 64.2%, 24% 65.1%, 25% 66.1%, 26% 67.2%, 27% 68.4%, 28% 69.65%, 29% 70.9%, 30% 72.15%, 31% 73.3%, 32% 74.35%, 33% 75.3%, 34% 76.1%, 35% 76.75%, 36% 77.2%, 37% 77.45%, 38% 77.5%, 39% 77.3%, 40% 76.95%, 41% 76.4%, 42% 75.65%, 43% 74.75%, 44% 73.75%, 45% 72.6%, 46% 71.4%, 47% 70.15%, 48% 68.9%, 49% 67.7%, 50% 66.55%, 51% 65.5%, 52% 64.55%, 53% 63.75%, 54% 63.15%, 55% 62.75%, 56% 62.55%, 57% 62.5%, 58% 62.7%, 59% 63.1%, 60% 63.7%, 61% 64.45%, 62% 65.4%, 63% 66.45%, 64% 67.6%, 65% 68.8%, 66% 70.05%, 67% 71.3%, 68% 72.5%, 69% 73.6%, 70% 74.65%, 71% 75.55%, 72% 76.35%, 73% 76.9%, 74% 77.3%, 75% 77.5%, 76% 77.45%, 77% 77.25%, 78% 76.8%, 79% 76.2%, 80% 75.4%, 81% 74.45%, 82% 73.4%, 83% 72.25%, 84% 71.05%, 85% 69.8%, 86% 68.55%, 87% 67.35%, 88% 66.2%, 89% 65.2%, 90% 64.3%, 91% 63.55%, 92% 63%, 93% 62.65%, 94% 62.5%, 95% 62.55%, 96% 62.8%, 97% 63.3%, 98% 63.9%, 99% 64.75%, 100% 65.7%);clip-path:polygon(100% 0, 0 0, 0 77.5%, 1% 77.4%, 2% 77.1%, 3% 76.6%, 4% 75.9%, 5% 75.05%, 6% 74.05%, 7% 72.95%, 8% 71.75%, 9% 70.55%, 10% 69.3%, 11% 68.05%, 12% 66.9%, 13% 65.8%, 14% 64.8%, 15% 64%, 16% 63.35%, 17% 62.85%, 18% 62.6%, 19% 62.5%, 20% 62.65%, 21% 63%, 22% 63.5%, 23% 64.2%, 24% 65.1%, 25% 66.1%, 26% 67.2%, 27% 68.4%, 28% 69.65%, 29% 70.9%, 30% 72.15%, 31% 73.3%, 32% 74.35%, 33% 75.3%, 34% 76.1%, 35% 76.75%, 36% 77.2%, 37% 77.45%, 38% 77.5%, 39% 77.3%, 40% 76.95%, 41% 76.4%, 42% 75.65%, 43% 74.75%, 44% 73.75%, 45% 72.6%, 46% 71.4%, 47% 70.15%, 48% 68.9%, 49% 67.7%, 50% 66.55%, 51% 65.5%, 52% 64.55%, 53% 63.75%, 54% 63.15%, 55% 62.75%, 56% 62.55%, 57% 62.5%, 58% 62.7%, 59% 63.1%, 60% 63.7%, 61% 64.45%, 62% 65.4%, 63% 66.45%, 64% 67.6%, 65% 68.8%, 66% 70.05%, 67% 71.3%, 68% 72.5%, 69% 73.6%, 70% 74.65%, 71% 75.55%, 72% 76.35%, 73% 76.9%, 74% 77.3%, 75% 77.5%, 76% 77.45%, 77% 77.25%, 78% 76.8%, 79% 76.2%, 80% 75.4%, 81% 74.45%, 82% 73.4%, 83% 72.25%, 84% 71.05%, 85% 69.8%, 86% 68.55%, 87% 67.35%, 88% 66.2%, 89% 65.2%, 90% 64.3%, 91% 63.55%, 92% 63%, 93% 62.65%, 94% 62.5%, 95% 62.55%, 96% 62.8%, 97% 63.3%, 98% 63.9%, 99% 64.75%, 100% 65.7%)}.arrow{border:solid #000;border-width:0 3px 3px 0;display:inline-block;padding:3px}.arrow.right{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}.arrow.left{transform:rotate(135deg);-webkit-transform:rotate(135deg)}.arrow.up{transform:rotate(-135deg);-webkit-transform:rotate(-135deg)}.arrow.down{transform:rotate(45deg);-webkit-transform:rotate(45deg)}.button-small{font-size:85%}.fetch-error{padding-top:1em;font-size:60%;max-width:400px;display:block}.button-secondary{color:#fff;border-radius:4px;text-shadow:0 1px 1px rgba(0,0,0,0.2)}.button-success{background:#1cb841}.button-tag{background:#636363;color:#fff;font-size:65%;border-bottom-left-radius:initial;border-bottom-right-radius:initial}.button-tag.active{background:#9c9c9c;font-weight:bold}.button-error{background:#ca3c3c}.button-warning{background:#df7514}.button-secondary{background:#42b8dd}.button-cancel{background:#c8c8c8}.messages li{list-style:none;padding:1em;border-radius:10px;color:#fff;font-weight:bold}.messages li.message{background:rgba(255,255,255,0.2)}.messages li.error{background:rgba(255,1,1,0.5)}.messages li.notice{background:rgba(255,255,255,0.5)}#notification-customisation{border:1px solid #ccc;padding:1rem;border-radius:5px}#token-table.pure-table td,#token-table.pure-table th{font-size:80%}#new-watch-form{background:rgba(0,0,0,0.05);padding:1em;border-radius:10px;margin-bottom:1em}#new-watch-form input{width:auto !important;display:inline-block}#new-watch-form .label{display:none}#new-watch-form legend{color:#fff}#seconds-warning {margin-top: 3px;color: red;white-space: pre-wrap;}#diff-col{padding-left:40px}#diff-jump{position:fixed;left:0;top:120px;background:#fff;padding:10px;border-top-right-radius:5px;border-bottom-right-radius:5px;box-shadow:5px 0 5px -2px #888}#diff-jump a{color:#1b98f8;cursor:grabbing;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none}footer{padding:10px;background:#fff;color:#444;text-align:center}#feed-icon{vertical-align:middle}.sticky-tab{position:absolute;top:80px;font-size:11px;background:#fff;padding:10px}.sticky-tab#left-sticky{left:0}.sticky-tab#right-sticky{right:0}#new-version-text a{color:#e07171}.paused-state.state-False img{opacity:.2}.paused-state.state-False:hover img{opacity:.8}.monospaced-textarea textarea{width:100%;font-family:monospace;white-space:pre;overflow-wrap:normal;overflow-x:scroll}.pure-form .pure-control-group,.pure-form .pure-group,.pure-form .pure-controls{padding-bottom:1em}.pure-form .pure-control-group div,.pure-form .pure-group div,.pure-form .pure-controls div{margin:0}.pure-form .error input{background-color:#ffebeb}.pure-form ul.errors{padding:.5em .6em;border:1px solid #d00;border-radius:4px;vertical-align:middle;-webkit-box-sizing:border-box;box-sizing:border-box}.pure-form ul.errors li{margin-left:1em;color:#d00}.pure-form label{font-weight:bold}.pure-form textarea{width:100%}.pure-form ul#fetch_backend{margin:0;list-style:none}.pure-form ul#fetch_backend > li > *{display:inline-block}@media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width: 1024px){.box{max-width:95%}.edit-form{padding:.5em;margin:0}#nav-menu{overflow-x:scroll}}@media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width: 1024px){input[type='text']{width:100%}.watch-table thead,.watch-table tbody,.watch-table th,.watch-table td,.watch-table tr{display:block}.watch-table .last-checked::before{color:#555;content:"Last Checked "}.watch-table .last-changed::before{color:#555;content:"Last Changed "}.watch-table td.inline{display:inline-block}.watch-table thead tr{position:absolute;top:-9999px;left:-9999px}.watch-table .pure-table td,.watch-table .pure-table th{border:none}.watch-table td{border:none;border-bottom:1px solid #eee}.watch-table td:before{top:6px;left:6px;width:45%;padding-right:10px;white-space:nowrap}.watch-table.pure-table-striped tr{background-color:#fff}.watch-table.pure-table-striped tr:nth-child(2n-1){background-color:#eee}.watch-table.pure-table-striped tr:nth-child(2n-1) td{background-color:inherit}}@media only screen and (min-width: 761px){.m-d{min-width:80%}}.tabs ul{margin:0;padding:0;display:block}.tabs ul li{margin-right:3px;display:inline-block;color:#fff;border-top-left-radius:5px;border-top-right-radius:5px;background-color:rgba(255,255,255,0.2)}.tabs ul li.active,.tabs ul li :target{background-color:#fff}.tabs ul li.active a,.tabs ul li :target a{color:#222;font-weight:bold}.tabs ul li a{display:block;padding:.8em;color:#fff}.pure-form-stacked > div:first-child{display:block}.edit-form{min-width:70%}.edit-form .tab-pane-inner{padding:0}.edit-form .tab-pane-inner:not(:target){display:none}.edit-form .tab-pane-inner:target{display:block}.edit-form .box-wrap{position:relative}.edit-form .inner{background:#fff;padding:20px}.edit-form #actions{display:block;background:#fff} diff --git a/changedetectionio/store.py b/changedetectionio/store.py index 7a669c24f..faf4a58b8 100644 --- a/changedetectionio/store.py +++ b/changedetectionio/store.py @@ -69,6 +69,9 @@ class ChangeDetectionStore: # Re #110, so then if this is set to None, we know to use the default value instead # Requires setting to None on submit if it's the same as the default 'minutes_between_check': None, + # #160 + 'seconds_between_check': None, + 'minutes_or_seconds': 'minutes', 'previous_md5': "", 'uuid': str(uuid_builder.uuid4()), 'headers': {}, # Extra headers to send diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index 8fb2e1b6a..e99c10f9a 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -32,17 +32,23 @@ Organisational tag/group name used in the main listing page
- {{ render_field(form.minutes_between_check) }} + + {{ render_field(form.minutes_between_check) }} + {{ render_field(form.minutes_or_seconds, onchange="minutes_or_seconds_change()") }} + {% if using_default_minutes %} - Currently using the Currently using the default global settings, change to another value if you want to be specific. {% else %} - Set to blank to use the Set to blank to use the default global settings. {% endif %}
- {{ render_field(form.extract_title_as_title) }} + +