Welcome to the ICM Forum. If you have an account but have trouble logging in, or have other questions, see THIS THREAD.
Podcast: Talking Images (Episode 9 released July 7th)
Polls: 2010s (Results), 1974 (Results), 2019 awards (Jul 11th), 0 Official Lists (Jul 31st)
Challenges: Canada, Low Rated, Director
Film of the Week: Picture of Light, August nominations (Jul 31st)
World Cup S4: Round 2 schedule, Match 2E: Georgia vs Ukraine (Jul 16th), Match 2F: Germany vs Iran (Jul 26th)

User-made scripts and apps etc

Post Reply
mjf314
Moderator
Posts: 11316
Joined: May 08, 2011
Contact:

Re: User-made scripts and apps etc

#841

Post by mjf314 » May 26th, 2020, 2:28 pm

Ok, I'll see if I can figure out how to fix it.

mjf314
Moderator
Posts: 11316
Joined: May 08, 2011
Contact:

#842

Post by mjf314 » May 26th, 2020, 3:58 pm

I think I fixed it. I updated the script here: viewtopic.php?p=624111#p624111

If the script tries to post and ends up on the mode=reply page (because someone else posted), then it clicks submit again.

This has a side effect:
If you click "start poll results", and later you make a post yourself and click submit, and you end up on the mode=reply page, it'll click submit for you (because the script doesn't know who made the post, you or the script). This side effect will go away if you close the page and reopen it. I couldn't think of an easy way to fix this, but it's just a minor issue.

User avatar
Tim2460
Posts: 2337
Joined: Oct 01, 2018
Location: Dijon, France
Contact:

#843

Post by Tim2460 » May 27th, 2020, 6:45 am

Let's try the new version today... but in slower mode ,)

User avatar
blueboybob
Donator
Posts: 2090
Joined: Mar 11, 2013
Location: DC
Contact:

#844

Post by blueboybob » July 4th, 2020, 9:00 pm

What is the script that lets you just put a giant list of IMDB URLs and it adds them all to an IMDB list?

mjf314
Moderator
Posts: 11316
Joined: May 08, 2011
Contact:

#845

Post by mjf314 » July 4th, 2020, 10:19 pm

blueboybob wrote:
July 4th, 2020, 9:00 pm
What is the script that lets you just put a giant list of IMDB URLs and it adds them all to an IMDB list?
https://greasyfork.org/en/scripts/11617 ... ist-helper

User avatar
blueboybob
Donator
Posts: 2090
Joined: Mar 11, 2013
Location: DC
Contact:

#846

Post by blueboybob » July 4th, 2020, 11:08 pm

yeap! thanks, got a new computer and am slowly re-installing all these things I dont use often.

User avatar
Onderhond
Posts: 4352
Joined: Dec 23, 2012
Contact:

#847

Post by Onderhond » July 6th, 2020, 10:21 am

Because mighty asked for it (and because I added a few stability fixes, and never posted it in this thread before it seems):

A Tampermonkey script that generates personal stats for the lists one ICM, which gives you something like this:
(for official lists, the last line will list the unique officials on the list)

Image

It also autosorts ascending and shows unchecked only when you sort a list on "runtime", should probably be a separate script though :)

Code: Select all

let filmList = document.getElementById('itemListMovies');
let filmListItems = filmList.querySelectorAll('.listItem');
let filmListTotal = filmListItems.length;
let checkedTotal = filmList.querySelectorAll('.listItem.checked').length;

// sort ascendinga and filter unchecked
if (!location.href.includes('sort=runtime')) {
    document.querySelector('#listOrderingruntime a').href = '?sort=runtime&asc';
}
if (location.href.includes('?sort=runtime&asc')) {
  let allMovies = document.getElementById('listFilterMovies')
  allMovies.classList.remove('active');
  let unCheckedMovies = document.getElementById('listFilterUnchecked')
  unCheckedMovies.classList.add('active');
  let checkedMovies = filmList.querySelectorAll('.listItem');
  for (let j=0; j < checkedMovies.length; ++j) {
    checkedMovies[j].style.display = (checkedMovies[j].classList.contains('checked')) ? "none" : "block";
  }
}

// extra list info
let uncheckedCount = filmList.querySelectorAll('.listItem.unchecked').length;
let highestUnchecked = '';
let highestUncheckedRank = '';
if (uncheckedCount > 0) {
    highestUnchecked = filmList.querySelector('.listItem.unchecked h2 a').innerHTML;
    highestUncheckedRank = '#' + filmList.querySelector('.listItem.unchecked .rank').childNodes[0].nodeValue.trim();
} else {
    highestUnchecked = 'All checked!';
    highestUncheckedRank = 'n/a';
}
let favoriteCount = filmList.querySelectorAll('.listItem.favorite').length;
let highestFavorite = '';
let highestFavoriteRank = '';
if (favoriteCount > 0) {
    highestFavorite = filmList.querySelector('.listItem.favorite h2 a').innerHTML;
    highestFavoriteRank = '#' + filmList.querySelector('.listItem.favorite .rank').childNodes[0].nodeValue.trim();
} else {
    highestFavorite = 'None found';
    highestFavoriteRank = 'n/a';
}
let hateCount = filmList.querySelectorAll('.listItem.hated').length;
let highestHate = '';
let highestHateRank = '';
if (hateCount > 0) {
    highestHate = filmList.querySelector('.listItem.hated h2 a').innerHTML;
    highestHateRank = '#' + filmList.querySelector('.listItem.hated .rank').childNodes[0].nodeValue.trim();
} else {
    highestHate = 'None found';
    highestHateRank = 'n/a';
}

let unofficialCount = 0;
let isOfficial = (document.getElementById('topList').querySelector('h4.compact').innerHTML.trim().includes("An official iCheckMovies list")) ? true : false;
let officialLabel = (isOfficial) ? 'Unique officials' : 'Unofficial films';
for (let k=0; k < filmListItems.length; ++k) {
    let info = filmListItems[k].querySelector('.info');
    let officialListCounter = info.querySelectorAll('a')[1];

    if (isOfficial && officialListCounter !== undefined) {
        if (officialListCounter.innerHTML.charAt(0) == '1' && officialListCounter.innerHTML.charAt(1) == ' ') {
            unofficialCount += 1;
        }
    } else if (officialListCounter !== undefined) {
        if (officialListCounter.innerHTML.charAt(0) == '0') {
            unofficialCount += 1;
        }
    } else {
        unofficialCount += 1;
    }
}


let extraInfo = '<div class="ohExtraInfo">';
extraInfo += '<div class="spec"><div class="label">Seen</div><div class="value">' + checkedTotal + '/' + filmListTotal + ' (' + Math.round((checkedTotal/filmListTotal)*100) + '%)</div></div>';
extraInfo += '<div class="spec"><div class="label">Highest unchecked</div><div class="value">' + highestUnchecked + ' (' + highestUncheckedRank + ')</div></div>';
extraInfo += '<div class="spec"><div class="label">Number of favorites</div><div class="value">' + favoriteCount + '/' + checkedTotal + ' (' + Math.round((favoriteCount/checkedTotal)*100) + '%)</div></div>';
extraInfo += '<div class="spec"><div class="label">Highest favorite</div><div class="value">' + highestFavorite + ' (' + highestFavoriteRank + ')</div></div>';
extraInfo += '<div class="spec"><div class="label">Number of dislikes</div><div class="value">' + hateCount + '/' + checkedTotal + ' (' + Math.round((hateCount/checkedTotal)*100) + '%)</div></div>';
extraInfo += '<div class="spec"><div class="label">Highest dislike</div><div class="value">' + highestHate + ' (' + highestHateRank + ')</div></div>';
extraInfo += '<div class="spec"><div class="label">' + officialLabel + '</div><div class="value">' + unofficialCount + '/' + filmListTotal + ' (' + Math.round((unofficialCount/filmListTotal)*100) + '%)</div></div>';
extraInfo += '</div>';
extraInfo += '<style>.ohExtraInfo {margin-bottom:20px;} .spec {display:flex; margin:4px 0;}.spec .label {font-weight:700; flex-basis:160px;}';
let printExtraLocation = document.getElementById('itemContainer');
printExtraLocation.insertAdjacentHTML('beforebegin', extraInfo);

User avatar
joachimt
Donator
Posts: 31767
Joined: Feb 16, 2012
Location: Netherlands
Contact:

#848

Post by joachimt » July 7th, 2020, 7:32 pm

IMDb details page links doesn't work for me anymore. Anyone else with this problem?
ICM-profile
Fergenaprido: "I find your OCD to be adorable, J"

User avatar
xianjiro
Donator
Posts: 7654
Joined: Jun 17, 2015
Location: Kakistani Left Coast
Contact:

#849

Post by xianjiro » July 8th, 2020, 12:36 am

joachimt wrote:
July 7th, 2020, 7:32 pm
IMDb details page links doesn't work for me anymore. Anyone else with this problem?
are you talking this https://www.imdb.com/user/ur1125225/?ref_=nv_usr_prof_2 or the reference view of movie pages? I can get to both.

Listen, Daddy. Teacher says, 'every time a car alarm bleeps, into heaven a demon sneaks.'
sol can find me here

User avatar
joachimt
Donator
Posts: 31767
Joined: Feb 16, 2012
Location: Netherlands
Contact:

#850

Post by joachimt » July 8th, 2020, 5:05 am

xianjiro wrote:
July 8th, 2020, 12:36 am
joachimt wrote:
July 7th, 2020, 7:32 pm
IMDb details page links doesn't work for me anymore. Anyone else with this problem?
are you talking this https://www.imdb.com/user/ur1125225/?ref_=nv_usr_prof_2 or the reference view of movie pages? I can get to both.
That link doesn't load for me.
I'm talking about the script that creates links to other sites on the left border of a moviepage on IMDb. There's nothing there now, although the script is running.
ICM-profile
Fergenaprido: "I find your OCD to be adorable, J"

User avatar
mightysparks
Site Admin
Posts: 30633
Joined: May 05, 2011
Location: Perth, WA, Australia
Contact:

#851

Post by mightysparks » July 8th, 2020, 5:09 am

It still works ok for me, but I don't use reference view.
"I do not always know what I want, but I do know what I don't want." - Stanley Kubrick

iCM | IMDb | LastFM | TSZDT

Image

User avatar
Tim2460
Posts: 2337
Joined: Oct 01, 2018
Location: Dijon, France
Contact:

#852

Post by Tim2460 » July 8th, 2020, 5:59 am

ICM enhanced didn't work either for me yesterday...
Time to upgrade something maybe?
Is there a way to debug on the fly those scripts?

User avatar
xianjiro
Donator
Posts: 7654
Joined: Jun 17, 2015
Location: Kakistani Left Coast
Contact:

#853

Post by xianjiro » July 8th, 2020, 7:25 am

joachimt wrote:
July 8th, 2020, 5:05 am
xianjiro wrote:
July 8th, 2020, 12:36 am
joachimt wrote:
July 7th, 2020, 7:32 pm
IMDb details page links doesn't work for me anymore. Anyone else with this problem?
are you talking this https://www.imdb.com/user/ur1125225/?ref_=nv_usr_prof_2 or the reference view of movie pages? I can get to both.
That link doesn't load for me.
I'm talking about the script that creates links to other sites on the left border of a moviepage on IMDb. There's nothing there now, although the script is running.
:shrug: okay, I'm out of ideas

Listen, Daddy. Teacher says, 'every time a car alarm bleeps, into heaven a demon sneaks.'
sol can find me here

User avatar
Tim2460
Posts: 2337
Joined: Oct 01, 2018
Location: Dijon, France
Contact:

#854

Post by Tim2460 » July 8th, 2020, 12:30 pm

Both icm enbhanced and imdb linker scripts works here at work.

Must be something related to the upgrade of firefox or tamper monkey.

That would clearly not be the first time ,(

@ work, here my firefox is 68.10.0esr (32 bits) and my tamper monkey is 4.11.6114 (and the icm/imdb scripts do work)

Post Reply